Get messages in RabbitMQ without consumption

3,278 views
Skip to first unread message

bruce love

unread,
Sep 26, 2022, 4:42:39 AM9/26/22
to rabbitmq-users
Now I need to know the Body of the message within RabbitMQ.
But I don't want to get the details of the message by consuming them.
I know trace can do this, but is there any other way to get the details of RabbitMQ messages?
Can I do it by parsing the persistent data file?

截屏2022-09-26 16.34.05.png

Or do it by parsing the index file?

截屏2022-09-26 16.40.25.png



Any help would be appreciated,
Bruce Love

Terry Rinck

unread,
Sep 26, 2022, 8:13:44 AM9/26/22
to rabbitm...@googlegroups.com
You can view a message body without consuming it through the management UI, but I think the bigger question is why do you want to do this?

--
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/e24a1e7d-1a19-4d2c-a7d7-980ffa5e7168n%40googlegroups.com.

bruce love

unread,
Sep 26, 2022, 10:03:33 PM9/26/22
to rabbitmq-users
That's the same, through the management ui, you still need to consume them to get message details.
It affects online consumers,I don't want that to happen.
截屏2022-09-27 10.02.34.png

Michal Kuratczyk

unread,
Sep 27, 2022, 2:49:36 AM9/27/22
to rabbitm...@googlegroups.com
Hi,

With quorum queues, you can use `rabbitmq-queues peek` to take a look at a certain message.
With streams, you can just run another consumer since consumption is non-destructive.
Parsing the files directly on disk is a way to do this but you'd need to write a tool for that - I'm not aware of an existing one.

Best,



--
Michał
RabbitMQ team
Reply all
Reply to author
Forward
0 new messages