Yesterday I showed how to remove unacked messages from a RabbitMQ queue through the Management Portal. Today let us leave the Graphical User Interface behind and solve the same problem from the command line. Through the command line RabbitMQ has multiple command line tools available in the sbin folder. The one we need is rabbitmqctl.bat Show queues with unacked connections like this. rabbitmqctl list_queues name messages_unacknowledged The output should be something like this: VLM.eShopExample.Worker-Development 1 VLM.eShopExample.Worker-Production 0 We see that one queue has an unacked message. Let's find out the channel and associated connection that is causing the unacked message. rabbitmqctl list_channels connection messages_unacknowledged This returns the following output: <rabbit@SERVER.1650192371.27249.9> 1 Ok, we found the channel tha
I got a situation where a message remained unacknowledged in a RabbitMQ queue. I wanted the related consumer to stop and remove the message from the queue. Let me walk you through the steps to get this done. Through the Management Portal In this post I’ll show you how to this through the Management Portal, in a later post I’ll show you how to do this from the commandline. Open the RabbitMQ Management Portal. Go to the Queues tab. Notice that in one of my queues I have an ‘Unacked’ message. First we need to find the connection that is related to the application consuming the message. Therefore go to the Connections tab. Click on the correct connection. Expand the Close this connection section and hit the Force Close button to close the connection and related channels. Click OK when asked for confirmation. Now go back to the Queues tab. Click on the queue with the ‘Unacked’ message. Expand the Purge section and hit the Purge Messages button.