rabbitmqrabbitmq-exchange

How to have more than 50 000 messages in a RabbitMQ Queue


We have currently using a service bus in Azure and for various reasons, we are switching to RabbitMQ. Under heavy load, and when specific tasks on backend are having problem, one of our queues can have up to 1 million messages waiting to be processed.

RabbitMQ can have a maximum of 50 000 messages per queue. The question is how can we design the rabbitMQ infrastructure to continue to work when messages are temporarily accumulating?

Note: we want to host our RabbitMQ server in a docker image inside a kubernetes cluster. we imagine an exchange that would load balance mesages between queues in nodes behind. But what is unclear to us is how to dynamically add new queues on demand if we detect that queues are getting full.


Solution

  • RabbitMQ can have a maximum of 50 000 messages per queue.

    There is no this kind of limit. RabbitMQ can handle more messages using quorum or classic queues with lazy. With stream queues RabbitMQ can handle Millions of messages per second.

    we imagine an exchange that would load balance messages between queues in nodes behind.

    you can do that using different bindings.

    kubernetes cluster.

    I would suggest to use the k8s Operator

    But what is unclear to us is how to dynamically add new queues on demand if we detect that queues are getting full.

    There is no concept of FULL in RabbitMQ. There are limits that you can put using max-length or TTL.