[rabbitmq-discuss] Issue with Topic Exchanges and multiple binding keys

Michael Klishin mklishin at gopivotal.com
Sat Aug 10 12:06:16 BST 2013


Michael Sullivan:

> Hello.  I am having an issue using the “Topic” type Exchange.  Following is the scenario…
>  
> ·         I have several different subscribers that are bound to the same Queue and Exchange, with different routing key wildcards..
> o   For example: 
> §  Da.response.server1.#
> §  Da.response.server2.#
> §  Da.response.server3.#
> ·         The messages being published have a routing key of ‘Da.response.server[n].blah.blah
> ·         The subscribers end up receiving All messages (round-robin), regardless of the routing key.
> ·         It’s almost as though the routing key is ignored and if a message is published that matches any of the bindings, Rabbit will route the message to any of the three servers.
>  
> Perhaps I am not fully understanding how the Topic Exchange should work, but something doesn’t seem right here, and with the way it’s working it’s basically defeating the purpose of a Topic Exchange.

Bindings control how messages are routed, not how they are distributed between consumers.

With a single queue, all consumers on it
will receive deliveries from it the around-robin basis. You likely want to use multiple queues,
with one (or more) consumers per each.

See tutorial 5 [1] or the 3rd tutorial in [2].

1. http://www.rabbitmq.com/getstarted.html
2. http://rubybunny.info/articles/getting_started.html#weathr_manytomany_topic_routing_example
--
MK

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130810/6a67bcc7/attachment.pgp>


More information about the rabbitmq-discuss mailing list