delete queues in a virtual host

615 views
Skip to first unread message

seigh...@gmail.com

unread,
Feb 7, 2022, 1:49:36 AM2/7/22
to rabbitmq-users
hi everyone

how can i delete all queues in a specific virtual host with a command?thanks inadvance

Wes Peng

unread,
Feb 7, 2022, 1:54:08 AM2/7/22
to rabbitm...@googlegroups.com
rabbitmqctl can do that.

   delete_queue                  Deletes a queue

   purge_queue                   Purges a queue (removes all messages in it)



Thanks



On Mon, Feb 7, 2022 at 2:49 PM seigh...@gmail.com <seigh...@gmail.com> wrote:
hi everyone

how can i delete all queues in a specific virtual host with a command?thanks inadvance

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/55b8c5f4-bee8-4cc1-909d-6571e7bf4622n%40googlegroups.com.
Message has been deleted

seigh...@gmail.com

unread,
Feb 7, 2022, 2:37:39 AM2/7/22
to rabbitmq-users
I found the answer:

for delete all queues in a specific vhost(in this example client) :


rabbitmqadmin -u admin -p "mypassword" -f tsv -q list queues name  --vhost=client > q.txt

for i in `cat q.txt`; do rabbitmqctl delete_queue "$i" --vhost=client; done


:)

On Monday, February 7, 2022 at 11:02:31 AM UTC+3:30 seigh...@gmail.com wrote:
I found the answer:

for delete all queues in a specific vhost(in this example client) :


rabbitmqadmin -u admin -p "mypassword" -f tsv -q list queues name > q.txt

for i in `cat q.txt`; do rabbitmqctl delete_queue "$i" --vhost=client; done


:)
Reply all
Reply to author
Forward
0 new messages