[rabbitmq-discuss] Round-robin queue failover
kyle at raidi.us
Wed Oct 21 21:06:20 BST 2009
On Tue, 20 Oct 2009 06:53:17 +0100
Matthias Radestock <matthias at lshift.net> wrote:
> Sebastian wrote:
> > Now I have come across this  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.
> > 
> > http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/
> That part of the article is wrong. Exchanges route messages to all
> the queues bound with a binding that matches the message. There is no
> round-robining going on; that only happens for delivering messages to
> multiple consumers of the same queue.
The author of the article seems to be confusing "declaring and consuming
from the same queue from two different places" with "creating two
identically-named queues" which (if I understand correctly) is not
possible, since declaration is idempotent. I would guess that's why the
operation is called "declare" and not "create".
If you reword it to remove the misunderstanding, then the statement
seems correct. Attempting to create two identically-named queues will
result in declaring the same queue twice; the two consumers then
consuming from that queue will see load-balancing behavior.
More information about the rabbitmq-discuss