In rabbitmq, we can delete a messages from queue or delete queue using web management portal for that we need to login into rabbitmq web management portal using default (guest) credentials like as shown below.
After logging into rabbitmq web management portal, navigate to Queues tab and click on the queue (demoqueue) which you want to delete a messages like as shown below.
After clicking on particular queue (demoqueue), multiple panels will be shown from that click on Delete panel like as shown below to delete messages from queue.
After opening Delete panel, you will see Delete Queue button like as shown below. Now click on Delete Queue button to delete a messages from queue or delete queue in rabbitmq.
After clicking on Delete Queue button, it will show the confirmation to delete a complete queue along with messages like as shown below.
If we click on OK button, then the queue will be completely deleted from rabbitmq server.
This is how we can delete queue or messages from queue in rabbitmq web management portal based on our requirements.