[rabbitmq-discuss] Order of publication to queues and HA nodes
Simon MacMullen
simon at rabbitmq.com
Tue Jan 28 15:07:56 GMT 2014
On 28/01/14 14:21, Duncan McIntyre wrote:
> Let's say I have a fanout exchange bound to a set of HA queues across 3
> nodes.
>
> When a message is published to the exchange, is there any deterministic
> ordering when the messages become available on the queues?
No.
RabbitMQ gives ordering guarantees for any given (publishing channel) ->
(queue) -> (consuming channel) route. There aren't any ordering
guarantees that make sense when more than one queue is involved, since
the queues run in parallel.
> Some
> customers care that there should be no advantage to one consumer over
> another in terms of when such a message becomes available.
Depends what you mean. It's obviously the case that the queues cannot
all receive the message simultaneously and transmit to all consumers
simultaneously too; even if we have more cores than consumers we
probably have fewer network cables...
But if you just mean "is there a systemic bias"? - the answer is
probably not. The publishing channel will dispatch the message to
multiple queues in a predictable order - but it's sending the message
asynchronously. Which queues receive the message first is then in the
hands of the scheduler - which is likely to impart enough randomness to
things for most purposes.
Having said which, I haven't tried to test this. Have you?
Cheers, Simon
--
Simon MacMullen
RabbitMQ, Pivotal
More information about the rabbitmq-discuss
mailing list