从RabbitMQ删除所有队列? [英] Delete all the queues from RabbitMQ?
问题描述
我安装了rabbitmqadmin
,并且能够列出所有交换和队列.如何使用rabbitmqadmin
或rabbitmqctl
删除所有队列.
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.
推荐答案
首先,列出您的队列:
rabbitmqadmin list queues name
然后从列表中,您需要一个一个地手动删除它们:
Then from the list, you'll need to manually delete them one by one:
rabbitmqadmin delete queue name='queuename'
由于没有显示输出格式,因此您可以grep list queues
的响应.另外,如果您只是在寻找一种清除所有内容的方法(请阅读:重置所有设置,将安装恢复为默认状态),请使用:
Because of the output format, doesn't appear you can grep the response from list queues
. Alternatively, if you're just looking for a way to clear everything (read: reset all settings, returning the installation to a default state), use:
rabbitmqctl stop_app
rabbitmqctl reset # Be sure you really want to do this!
rabbitmqctl start_app
这篇关于从RabbitMQ删除所有队列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!