Filter the queue based on payload value

Skip to first unread message

Akshaya

unread,
May 28, 2018, 10:16:32 PM5/28/18
to rabbitmq-users
Hi,

How to filter rabbitMQ queue based on payload value. My payload values are in json format and I want to filter based on specific value.

# rabbitmqadmin get queue=name_queue
+-------------+-------------+---------------+----------------------+
| routing_key |  exchange   | message_count |   payload            | 
+-------------+-------------+---------------+----------------------+
|             | name_exch   | 1             | {"name": "testing"}  |
+-------------+-------------+---------------+----------------------+

Example here I want to get listed all the messages in the queue "name_queue" where the name is testing.
Is there any way for it?

Thanks & Regards,
Akshaya

anup anand

unread,
May 28, 2018, 11:24:41 PM5/28/18
to rabbitm...@googlegroups.com
You can use the API to write a consumer application that would do this or if you are using Chrome browser, you can write a chrome plugin that give you this feature on the queue page in management console.

Ootb, rabbitmq does not have such functionality. You should also keep in mind few things-
1. More the ready messages, more time it would take to search. Message size will play a role as you would be fetching all the messages and performing the lookup.
2. Make sure to read and nack the messages so that they stay in the queue and be available for genuine consumers.

Thanks
Anup

--
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 post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages