O'Reilly logo

RabbitMQ Cookbook by Sigismondo Boschi, Gabriele Santomaggio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required