Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RabbitMQ - cannot delete queue

Tags:

rabbitmq

We had a network network partition and RabbitMQ ended up in "split brain".

After the cluster recovered, I have a queue that I cant delete. In the mgmt. interface the queue is just listed with "?", and I'm unable to delete it from using mgmt. interface or from commandline.

I have tried to remove the node "sh-mq-cl1a-04" from the cluster, but the queue remains in the cluster.

like image 896
Kristian Jensen Avatar asked May 26 '15 17:05

Kristian Jensen


People also ask

How do I delete my RabbitMQ queue?

A queue can be deleted from the RabbitMQ Management Interface. Enter the queue tab and go to the bottom of the page. You will find a dropdown "Delete / Purge". Press Delete to the left to delete the queue.

How do I clear my queue?

In the navigation pane, choose Queues. On the Queues page, choose the queue to delete. Choose Delete. In the Delete queue dialog box, confirm the deletion by entering delete .

Can I delete RabbitMQ?

To uninstall RabbitMQ and Erlang: Open the Control Panel. Select Uninstall a program. Right-click RabbitMQ Server, and then click Uninstall.

How do I delete a RabbitMQ policy?

Then, log into the RabbitMQ console UI and go to the Admin tab. Expand the "All Policies" section and you should see your existing policies. We can clear all existing policies by clicking each one, expanding the "Delete this policy" section and clicking the button labeled "Delete this policy".


1 Answers

I had a similar issue where I couldn't delete some queues, and the solution listed here worked for me: https://community.pivotal.io/s/article/Queue-cant-be-deleted-or-purged-in-RabbitMQ

I ssh'd onto one of the nodes in my cluster (the one where the queue is hosted is probably best), sudo'd as root, and then ran this command:

rabbitmqctl eval '{ok, Q} = rabbit_amqqueue:lookup(rabbit_misc:r(<<"VHOST">>, queue, <<"QUEUE">>)), rabbit_amqqueue:delete_crashed(Q).'

You'll need to replace VHOST with your virtual host name, and QUEUE with your queue name (which I realize it might be tricky to figure out, in your situation).

like image 56
Steve K Avatar answered Oct 26 '22 15:10

Steve K