在 RabbitMQ 中删除队列 [英] Deleting queues in RabbitMQ
问题描述
我有几个使用 RabbitMQ 运行的队列.有几个现在没用了,怎么删除?不幸的是,我没有设置 auto_delete
选项.
I have a few queues running with RabbitMQ. A few of them are of no use now, how can I delete them? Unfortunately I had not set the auto_delete
option.
如果我现在设置,会被删除吗?
If I set it now, will it be deleted?
现在有办法删除这些队列吗?
Is there a way to delete those queues now?
推荐答案
如果你不关心管理数据库中的数据;即users
、vhosts
、messages
等,其他queues
都没有,那么你可以reset
通过命令行按顺序运行以下命令:
If you do not care about the data in management database; i.e. users
, vhosts
, messages
etc., and neither about other queues
, then you can reset
via commandline by running the following commands in order:
警告:除了队列之外,这还将删除任何用户
和vhosts
,你已经在你的RabbitMQ服务器上进行了配置;并将删除任何持久的消息
WARNING: In addition to the queues, this will also remove any
users
andvhosts
, you have configured on your RabbitMQ server; and will delete any persistentmessages
rabbitmqctl stop_app
rabbitmqctl reset
rabbitmqctl start_app
rabbitmq 文档 说reset
命令:
将 RabbitMQ 节点返回到其原始状态.
Returns a RabbitMQ node to its virgin state.
从它所属的任何集群中删除节点,从其中删除所有数据管理数据库,例如配置的用户和虚拟主机,以及删除所有持久消息.
Removes the node from any cluster it belongs to, removes all data from the management database, such as configured users and vhosts, and deletes all persistent messages.
所以,小心使用它.
这篇关于在 RabbitMQ 中删除队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!