Is there any way to find the status of RabbitMq consumer/listener.

190 views
Skip to first unread message

Bhargav Pattem

unread,
Jul 19, 2019, 6:03:33 AM7/19/19
to rabbitmq-users

I've written a RabbitMq listener application using spring-boot and want to know the status whether it is processing the messages or idle.


I've been through the rabbitMq HTTP API doc and found /api/queues/vhost/name/get endpoint gives the message count and message body. I see an opportunity in that, decided to compare the message count and message body for two successive responses. If both responses are same then the listener is idle else it's processing.


I used RestTemplate's postForEntity() with {"count":1,"requeue":true,"encoding":"auto"} as request body. But strangely rabbitmq-server isn't responding for this API, however its responding for other API endpoint in the doc.


If there's any way to get the status of the listener, please share the details. Thanks in advance.

Michael Klishin

unread,
Jul 31, 2019, 4:20:52 PM7/31/19
to rabbitmq-users
The count field returns the number of messages ready for delivery [1]. If you consume and then requeue, that value won't change.

Reply all
Reply to author
Forward
0 new messages