I installed rabbitmqadmin
and was able to list all the exchanges and queues. How can I use rabbitmqadmin
or rabbitmqctl
to delete all the queues.
相关问题
- Error message 'No handlers could be found for
- RabbitMQ management plugin windows renders as blan
- Are topic exchanges the only exchanges that suppor
- Permission for sockets - android manifest
- RabbitMq refuses connection when run in docker
相关文章
- RabbitMQ with Unity IOC Container in .NET
- Install rabbitmqadmin on linux
- Spring AMQP single consumer parallelism with prefe
- Play Framework send message via rabbit mq
- Background jobs with Play Framework on Heroku
- RabbitMQ - Send message to a particular consumer i
- How to disable heartbeats with pika and rabbitmq
- Group received messages in RabbitMQ, preferably us
Another option is to delete the vhost associated with the queues. This will delete everything associated with the vhost, so be warned, but it is easy and fast.
NOTE: the RabbitMQ team monitors the
rabbitmq-users
mailing list and only sometimes answers questions on StackOverflow.If you're trying to delete queues because they're unused and you don't want to reset, one option is to set the queue TTL very low via a policy, wait for the queues to be auto-deleted once the TTL is passed and then remove the policy (https://www.rabbitmq.com/ttl.html).
To remove the policy
Note that this only works for unused queues
Original info here: http://rabbitmq.1065348.n5.nabble.com/Deleting-all-queues-in-rabbitmq-td30933.html
In case you only want to purge the queues which are not empty (a lot faster):
For me, it takes 2-3 seconds to purge a queue (both empty and non-empty ones), so iterating through 50 queues is such a pain while I just need to purge 10 of them (40/50 are empty).
For whose have a problem with installing rabbitmqadmin, You should firstly install python.
UNIX-like operating system users need to copy rabbitmqadmin to a directory in PATH, e.g. /usr/local/bin.
Windows users will need to ensure Python is on their PATH, and invoke rabbitmqadmin as python.exe rabbitmqadmin.
Then
http://{hostname}:15672/cli/rabbitmqadmin
to download.To list Queues
python rabbitmqadmin list queues
.To delete Queue
python rabbitmqadmin delete queue name=Name_of_queue
To Delete all Queues
1- Declare Policy
2- Remove the policy
I tried rabbitmqctl and reset commands but they are very slow.
This is the fastest way I found (replace your username and password):
Note: This only works with the default vhost /