[rabbitmq-discuss] Pattern - exclude

Emile Joubert emile at rabbitmq.com
Wed Feb 20 11:44:01 GMT 2013


Hi,

On 20/02/13 10:49, Emile Joubert wrote:
> The wildcard characters * and # only match on whole words, so a pattern
> like publish.A# is not valid. You can get around this restriction
Matthias has just pointed out that the problem can also be solved using
alternative exchanges and exchange-to-exchange bindings. If you chain
together three topic exchanges amq.topic, X and Y, and you set up an
alternate exchange on X in the way described here:

exchange amq.topic
 |
(bind A.#)
 |
exchange X  - (alternate exchange) Z - queue Q
 |
(bind #.B)
 |
exchange Y

then messages matching your criteria (matches A.# but not #.B) published
to amq.topic will end up in queue Q.





-Emile








More information about the rabbitmq-discuss mailing list