Search code examples
rabbitmqrabbitmq-exchangerabbitmqctl

How to scale up the queue in RabbitMQ dynamically?


can I create queue dynamically using RabbitMQ?

In my application, I want the queues to scale up dynamically whenever the queue is full.can I do that with RabbitMQ?

Thanks in advance.


Solution

  • You can't create a dynamic queue but you can create a fixed size one, then monitorize it and scale up when it is getting full.

    You can change the size at runtime via a policy in the RabbitMQ server through the management plugin's HTTP API.

    Here it is a example of how to change the queue size parameter: https://www.rabbitmq.com/maxlength.html.

    And here how you can change it at runtime via a policy: https://www.rabbitmq.com/parameters.html.

    The monitoring task is also done via management plugin's HTTP API. Here some help: https://stackoverflow.com/a/24408669/8041414

    I hope this helps you