RabbitMQ¶
How to Delete all the queues from RabbitMQ?¶
1. Using Policies - Management Console¶
- Go to Management Console
- Click on Admin tab
- Policies tab (on the right side)
- Add Policy
- Fill Fields
- Virtual Host: Select (Default is /hyperion)
- Name: Expire All Policies(Delete Later)
- Pattern: .*
- Apply to: Queues
- Definition: expires with value 1 (change type from String to Number)
- Click on
Add / update policy
- Checkout Queues tab again, all queues must be deleted.
Warning
You must remove this policy after this operation.
2. Using command line¶
First, list your queues:
rabbitmqadmin list queues name
rabbitmqadmin delete queue name='queuename'
list queues
.
Alternatively, if you're just looking for a way to clear everything, use:
rabbitmqctl stop_app
rabbitmqctl reset
rabbitmqctl start_app
Warning
Be sure you really want to do this! This gonna reset all your rabbitMQ configuration, and return it to the default state.