[rabbitmq-discuss] Cluster capability?

Alvaro Videla videlalvaro at gmail.com
Thu Nov 28 15:12:13 GMT 2013


Hi,

On Thu, Nov 28, 2013 at 2:36 PM, Paul <arachweb at gmail.com> wrote:

> My concern is that in an HA Queue implementation, a given message could be consumed more than once, i.e., once on computer A and once on B. Consequently, the same unit of work will be executed twice, and that's no good.

No. RabbitMQ will ensure that a message will be seen by just one
consumer. If a message arrived to queue Q, which is mirrored on node A
and node B, the message will be replicated across those nodes, but
still RabbitMQ will send the message to just one consumer. HA queues
have a master node and it will synchronise work with the slave queues.

Of course what Simon says above also applies. If a message got routed
to more than one queue, then that particular message could be seen by
more than one consumer, but that doesn't seem to be what you are
asking here.

For a particular queue (whether HA or not) messages are delivered just
once. If the consumer is in ack mode and it crashes before acking,
then yes, that message will be requeued and delivered again.

Also one recommendation, although not easy to achieve, is to have
idempotent consumers.

Regards,

Alvaro


More information about the rabbitmq-discuss mailing list