What are the options available with rabbitMQ for load balancing. I have already gone throght the article http://insidethecpu.com/2014/11/17/load-balancing-a-rabbitmq-cluster/ . Is there any alternative way that can be done? We have only single queue which is mirrored b/w two nodes and we need to load balance b/w them
Asked
Active
Viewed 2,618 times
1 Answers
1
AMQP guarantees message ordering. That's why a queue has a single master and many slaves, and all messages need to go through the master instance.
If you don't need this ordering, your best solution is to not cluster RabbitMQ nodes. Just run them independently and load-balance your clients in a round-robin manner.

Jean-Sébastien Pédron
- 2,037
- 15
- 28
-
That seems like a good alternative, but how will the mirroring of queue happen if they are not in same cluster. We need to do it by manually pushing same message in both nodes? – Shivang MIttal Mar 30 '16 at 07:16
-
If you still need redundancy, you can probably find the right balance by using the [consistent hash exchange plugin](https://github.com/rabbitmq/rabbitmq-consistent-hash-exchange) or the [sharding plugin](https://github.com/rabbitmq/rabbitmq-sharding) and mirror the queues. – Jean-Sébastien Pédron Mar 30 '16 at 09:52