[rabbitmq-discuss] Round-robin queue failover

Sebastian mail at sebastian-latza.de
Mon Oct 19 11:41:06 BST 2009


Hi everybody,

I'm looking into a way how to implement a HA setup for persistent  
queues. Since the rabbitmq cluster doesn't replicate queues across  
multiple nodes my initial idea was to implement this on the client:  
connect publisher and consumers to multiple independent servers,  
create identical exchanges and queues, then send the messages round  
robin to the nodes. While this has the additional benefit of proper  
scalability it requires some effort on the client, I basically have to  
override all methods and encapsulate the "replication" logic there.  
While this isn't a true HA setup (messages in the broken node can't be  
delivered until restart and correct order of messages isn't guaranteed  
anymore) it solves 90% of the problem by providing a way to allow  
continuous message publishing.

Now I have come across this [1] blog-post by Ilya Grigorik which  
says:  "Assign two identically named queues to an exchange and the  
broker will automatically round-robin the messages". So my  
understanding is that I could just create identical queues on every  
node, and the broker will take care of the rest: if one node goes  
down, messages will just be spread over the other queues/nodes.
Is this supported by rabbitmq? I've looked around in the amqp specs  
and documentation, but couldn't find anything related.

Regards
Sebastian

[1] http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/




More information about the rabbitmq-discuss mailing list