Bootstrap FreeKB - RabbitMQ - Display messages in a queue using the rabbitmqadmin command
RabbitMQ - Display messages in a queue using the rabbitmqadmin command

Updated:   |  RabbitMQ articles

This assumes you have downloaded and setup the rabbitmqadmin command line tool.

The rabbitmqadmin command can be used to display the contents of a message in a queue. It is very important to ensure that the requeue or ackmode option is set to true, so that the message is not purged off of the queue. If using RabbitMQ version 3.7 or higher, ackmode is used.

rabbitmqadmin get queue=queue001 ackmode=true

 

Below version 3.7, requeue is used.

rabbitmqadmin get queue=queue001 requeue=true

 

Something like this should be returned.

+-------------+----------+---------------+--------------+------------------+-------------+
| routing_key | exchange | message_count |   payload    | payload_encoding | redelivered |
+-------------+----------+---------------+--------------+------------------+-------------+
| key001      |          | 1             | Hello World  | string           | False       |
+-------------+----------+---------------+--------------+------------------+-------------+

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 99d9d1 in the box below so that we can be sure you are a human.