Class MockTopicExchange
- java.lang.Object
-
- com.github.fridujo.rabbitmq.mock.exchange.BindableMockExchange
-
- com.github.fridujo.rabbitmq.mock.exchange.MultipleReceiverExchange
-
- com.github.fridujo.rabbitmq.mock.exchange.MockTopicExchange
-
- All Implemented Interfaces:
MockExchange,Receiver
public class MockTopicExchange extends MultipleReceiverExchange
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.fridujo.rabbitmq.mock.exchange.BindableMockExchange
BindableMockExchange.BindConfiguration
-
-
Field Summary
Fields Modifier and Type Field Description static StringTYPE-
Fields inherited from class com.github.fridujo.rabbitmq.mock.exchange.BindableMockExchange
bindConfigurations
-
Fields inherited from interface com.github.fridujo.rabbitmq.mock.Receiver
X_MATCH_KEY
-
-
Constructor Summary
Constructors Constructor Description MockTopicExchange(String name, AmqArguments arguments, ReceiverRegistry receiverRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanmatch(BindableMockExchange.BindConfiguration bindConfiguration, String routingKey, Map<String,Object> headers)-
Methods inherited from class com.github.fridujo.rabbitmq.mock.exchange.MultipleReceiverExchange
matchingReceivers
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MockTopicExchange
public MockTopicExchange(String name, AmqArguments arguments, ReceiverRegistry receiverRegistry)
-
-
Method Detail
-
match
protected boolean match(BindableMockExchange.BindConfiguration bindConfiguration, String routingKey, Map<String,Object> headers)
https://www.rabbitmq.com/tutorials/tutorial-five-python.htmlsharp / hash character substitutes to zero or more words
An easy thought representation of routing keys is a list of words, words being separated by dots, and topic exchange binding keys an description of this kind of list.
Considering the key some.#.key.*, all these keys can match:
- some.key.redeyes where # matches for no words and * for 1 word (redeyes)
- some.pink.key.blueeyes where # matches for 1 words (pink) and * for 1 word (blueeyes)
- some.pink.rabbit.key.random where # matches for 2 words (pink, rabbit) and * for 1 word (random)
- Specified by:
matchin classMultipleReceiverExchange
-
-