[rabbitmq-discuss] Clustering and ordering, please explain

rabbit at subscribed.udmvt.ru rabbit at subscribed.udmvt.ru
Mon Sep 20 10:25:52 BST 2010


On Thu, Sep 16, 2010 at 10:51:18AM +0100, David Wragg wrote:
> > But the question is: what if two boxes, A and B, each have published a
> > message to the same exchange at the same moment in time, is it true,
> > that there is no ordering guaranties when that messages gets delivered
> > to queues across nodes? Is it true, that different queues may deliver
> > two messages in different order, despite they had been published on
> > the same exchange?
> 
> AMQP does not guarantee the order of messages in this case anyway, so
> even without clustering, it would be ok for rabbit to route the messages
> to queues bound to the same exchange in different orders.
> 
> The ordering guarantees of AMQP 0-9-1 are covered in section 4.7 of the
> specification PDF (available at
> <http://www.amqp.org/confluence/display/AMQP/AMQP+Specification>:
> 
>    [...] Specifically, contents flowing through a single path within the
>    server will remain ordered. For contents of a given priority flowing
>    through a single path, we define a content processing path as
>    consisting of one incoming channel, one exchange, one queue, and one
>    outgoing channel. [...]
> 
> So if you have two queues, you are dealing with two different content
> processing paths, and the order that messages arrive in the two queues
> does not have to be consistent.
That means, that I cannot use rabbitmq cluster as a cheapo replacement for
a high-availability distributed event serializer with no single point of failure :(

> 
> The relaxed nature of this ordering guarantee may surprise people.  It
> surprised me.
> 
> David
Thanks for the answer!

And thanks for that great piece of software I am using.

-- 
Alexey


More information about the rabbitmq-discuss mailing list