最简单方便的删除RabbitMq所有的queue
Another option for deleting all queues (since 3.2.0) is to define a policy which gives every queue a very short expiry.
$ rabbitmqctl set_policy deleter ".*" '{"expires":1}' --apply-to queues
Then - assuming your queues are unused, which I assume is why you're deleting them - this will expire them near-immediately. Remember to delete the policy again afterwards, or you'll struggle to declare anything...
This line creates a policy named deleter which applies to all names (.*) and will be applied to queues.
$ rabbitmqctl clear_policy deleter
最方便的方法,没有之一;
总结为两部:
rabbitmqctl set_policy deleter ".*" '{"expires":1}' --apply-to queues
rabbitmqctl clear_policy deleter
搞定!
当你发现自己的才华撑不起野心时,就请安静下来学习吧!