How to pause and resume a queue in LavinMQ
Trying to upgrade or debug misbehaving consumers? Or is your system struggling with a sudden surge in traffic? LavinMQ gives you control over the flow of messages without altering queue configuration.
In LavinMQ, you can pause or resume a queue. Pausing stops consumers from getting messages, but keeps all queue configuration. When you resume, consumers start processing messages again. This is helpful during maintenance, debugging, or even when moving to a new queue.This way, you control message flow without losing data.
You can pause or resume a queue in your CloudAMQP LavinMQ instance using the Management UI or HTTP API.
Pausing a queue via LavinMQ HTTP API
To pause a queue, run:
curl -X PUT https://<username>:<password>@<host>/api/queues/<vhost>/<queue_name>/pause
Resuming a queue using LavinMQ HTTP API
To resume a paused queue, run:
curl -X PUT https://<username>:<password>@<host>/api/queues/<vhost>/<queue_name>/resume
Checking queue status using LavinMQ HTTP API
To check whether a queue is paused or running, run:
curl -s -u <username>:<password> https://<host>/api/queues/<vhost>/<queue_name> | jq '.state'
This command returns "paused" if the queue is paused, "running" if it’s active.
🔧 Replace the placeholders:
-
<username>
and<password>
With your LavinMQ HTTP API credentials -
<host>
With your instance’s hostname -
<vhost>
With your virtual host -
<queue_name>
With your actual queue name
Pausing a queue using LavinMQ Management UI
- Log in to your CloudAMQP account. Click LavinMQ Manager at the top-left corner (indicated by a red arrow in the screenshot below)

- Click "Queues" at the top navigation bar or the left-hand menu. (indicated by red arrows in the screenshot below)

- From the list of queues, click on the name of the queue you want to pause.
- Scroll down on the queue details page until you find the "Pause Queue" section. (indicated by a red arrow in the screenshot below)

- Click the "Pause queue" button and confirm the action if prompted.
- To verify, click the "Queues" tab in the left-hand menu and check the queue status. You should see two red vertical lines. (indicated by a red arrow in the screenshot below)

If the queue is in a paused state, it will not deliver messages to consumers, but it can still receive new messages.
Resuming a queue using LavinMQ Management UI
- To resume the paused queue, follow the steps to pause a queue above. You will find the "Pause queue" button changed to "Resume queue." Click it and confirm if prompted.
- To verify if the queue is running, click the "Queues" tab in the left-hand menu and check the queue status.You should see a solid green circle(indicated by a red arrow in the screenshot below).

Summary
In LavinMQ, you can pause and resume a queue without changing its configuration. This keeps messages safe and prevents data loss. It’s handy during maintenance, debugging, or heavy traffic. You can do it from the Management UI or the HTTP API. This gives you full control without affecting system stability.
Want to learn more about managing queues in LavinMQ? Check out our Queue Management Guide