Mirroring queues
RabbitMQ clusters don't mirror queues by default. The queues are stored in the broker nodes connected to the clients that created them. Whenever such a node fails, all the queues and the messages stored within it aren't available.
If you have defined the queues as durable and the messages as persistent, it's possible to restore the node without losing data but this is not sufficient.
In fact, designing a highly available application can't be acceptable. There are many cases where the application must be able to survive the death of one component without interruption.
The ha-policies help to solve this problem. In this recipe, we will show you how to mirror a queue across all the nodes in the cluster.
Getting ready
You need a RabbitMQ ...
Get RabbitMQ Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.