Search code examples
rabbitmqhigh-availabilitymirroring

RabbitMQ guarantee delivery to mirrored queue


Assume I have a mirrored queue deployed over multiple nodes (f.e. 1 master + 1 mirror). I can define the number of mirrors I want but is it possible to only accept a producer message when the message is stored at least on 2 queues (master + mirror). Otherwise it is still possible to loose a message when the master node fails before the message is mirrored.

So the mirroring activity should be part of the transaction.


Solution

  • You should use Publisher Confirms. When this is enabled, and your publisher has received confirmation, you can be certain that your message has been replicated to all queue mirrors.

    Searching Google for site:rabbitmq.com high availability returns this document which mentions Publisher Confirms here.