[rabbitmq-discuss] Behaviour of Federated Queues

Josh West jsw at one.com
Thu Jan 23 16:16:59 GMT 2014

Hey folks,

I have a question regarding the behaviour of federated queues...

For this question, assume I have 3 RabbitMQ brokers federated with each 
other in a complete graph fashion (they all talk to each other).  
Broker1 has a federated queue policy to federate queue's having pattern 
^broker1.* with upstreams.  Broker2 does the same, but with pattern 
^broker2.* and Broker3 has pattern ^broker3.* ... this way any client 
can send messages to any client on another broker just by placing a 
message into a queue beginning with the destination broker's name :-)

I have noticed that if I create a queue on broker1 with name 
"broker1.foo.bar" (for example), the queue is automatically created on 
broker2 and broker3.  Should this occur?  Or should federation only 
create the queue on upstream brokers when needed (ad-hoc)?

I ask for two reasons:

1. This could be a waste of resources if one has lots of queues matching 
federation patterns or if one has say 200+ brokers federated with each 

2. When queues are created with the Auto Delete parameter, that 
parameter is of course properly propagated.  But say a client puts a 
message into the queue "broker1.foo.bar" on broker2 and say a client 
retrieves the message from that same queue on broker1.  The Auto Delete 
parameter behaviour would be triggered and the queue is then deleted 
from broker1 and broker2 (upon client disconnection). But... Since 
nobody has ever put any messages into the queue "broker1.foo.bar" 
residing on broker3, the queue will remain defined possibly indefinitely.

Hope somebody can clarify this for me!


Josh West
One.com - http://www.one.com

More information about the rabbitmq-discuss mailing list