[rabbitmq-discuss] multicast without cycles?

Michael Klishin mklishin at gopivotal.com
Tue Jun 17 01:54:32 BST 2014

On 17 June 2014 at 04:28:22, nick.stroh at icgsolutions.com (nick.stroh at icgsolutions.com) wrote:
> > Hello, I'm new to AMQP. What's the best way to implement a multicast 
> topology with the following characteristics:
> - Each node can broadcast messages to each other node, but does 
> not receive its own messages.
> - Nodes can join or leave the topology dynamically

The simplest (and most efficient/scalable for the # of consumers) solution may be
to use a fanout exchange with every consumer having its own (server-named, exclusive)
queue it binds to the exchange. Clients then would add a header ("owner") to
every message and ignore deliveries from itself.

Newly joined clients then can simply declare an exclusive queue, bind it and consume.
Should a client fail, the queue will be deleted by RabbitMQ (because of the "exclusive"

A downside to using server-generated exclusive queues: peers cannot route messages to each
other individually&


Software Engineer, Pivotal/RabbitMQ

More information about the rabbitmq-discuss mailing list