Deleting RabbitMQ Queues
This section describes how to delete queues. Deleting a queue removes all its configurations including exchange-queue bindings permanently.
Methods of deleting a queue:
- Deleting a Queue (Console)
- Deleting a Queue (RabbitMQ Management UI)
- Deleting Queues in Batches (RabbitMQ Management UI)
Prerequisite
A queue has been created.
Deleting a Queue (Console)
- Log in to the console.
- In the upper left corner, click and select a region.
Select the region where your RabbitMQ instance is.
- Click and choose Application > Distributed Message Service for RabbitMQ to open the console of DMS for RabbitMQ.
- Click an instance name to go to the instance details page.
- In the navigation pane, choose Virtual Hosts.
- Click a virtual host name.
- On the Queue tab page, delete queues in either of the following ways:
- Select one or more queues and click Delete Queue in the upper left corner.
- In the row containing the desired queue, click Delete.
- Click OK.
Deleting a Queue (RabbitMQ Management UI)
- Log in to the RabbitMQ management UI.
- On the Queues tab page, click the name of the desired queue.
Figure 1 Queues
- Click Delete Queue.
Figure 2 Deleting a queue
Deleting Queues in Batches (RabbitMQ Management UI)
Add a policy to delete multiple queues at a time. The policy has the same prefix as the queues to be deleted, and the queue TTL is 1 ms.
- Log in to the RabbitMQ management UI.
- On the Admin > Policies page, add a policy.
Figure 3 Adding a policy to delete queues in batches
Table 1 Policy elements Parameter
Description
Name
The policy name, which can be customized.
Pattern
Queue matching mode. Enter a queue name. Queues containing this queue name will be matched.
If this parameter is set to .*, all queues are matched. If this parameter is set to .*queue-name, all queues whose names contain queue-name are matched.
Apply to
Object to which the policy applies. Select Queues.
Priority
A larger value indicates a higher priority.
Definition
TTL, in milliseconds. Set expires to 1, indicating that the queue expiration time is 1 ms.
- Click Add policy.
On the Queues tab page, check whether the queues are successfully deleted.
- After the queues are deleted, choose Admin > Policies, locate the row containing the policy added in 2, and click Clear to delete the policy.
If this policy is retained, it will also apply to queues created later, and queues may be deleted by mistake.Figure 4 Deleting the policy
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.