[rabbitmq-discuss] Cluster capability?
Darren Govoni
darren at ontrenet.com
Thu Nov 28 15:45:35 GMT 2013
It should also be noted that if the "master" node for an HA queue
becomes inactive a new one is elected.
On 11/28/2013 10:12 AM, Alvaro Videla wrote:
> 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
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list