Incorrect Messages count in RabbitMQ UI for the Queue

305 views
Skip to first unread message

Pankaj Kumar Pandey

unread,
Jul 4, 2018, 4:55:16 AM7/4/18
to rabbitmq-users

Hello Team,



Issue: 


in rabbitmq UI no of message count is 602 but same when i am trying to get through curl command it's showing same count of messages but there is no messages inside the queue.


i also tried to fetch message from rabbitmq gui and RMQ rest API  but found no messages on the queue. attached screen shot for the same.



please help why this is happening ? 


RMQ version: 3.6.12
No of message in ready state: 602 (as per UI)
No of messages as per curl: 602


message count API:


curl -i -u devops:******* -X GET http://******:15672/api/queues/growth/domain_q_prod_TransformerHMSEvent |sed 's/,/\n/g' | grep '"messages"' | sed 's/"messages"://g'


Get Message API:

trying to fetch message using curl:

curl -i -u devops:****** -H "content-type:application/json" -X POST http://******:15672/api/queues/growth/domain_q_prod_TransformerHMSEvent/get -d'{"count":100,"requeue":true,"encoding":"auto","truncate":50000}'

response:
HTTP/1.1 200 OK
server: Cowboy
date: Wed, 04 Jul 2018 04:26:08 GMT
content-length: 2
content-type: application/json
vary: accept, accept-encoding, origin
Cache-Control: no-cache
Content-Type: application/json
[]

Screen Shot 2018-07-04 at 09.55.40.png
Screen Shot 2018-07-04 at 09.55.54.png

Michael Klishin

unread,
Jul 4, 2018, 5:14:45 AM7/4/18
to rabbitm...@googlegroups.com
The management UI page you are looking at uses a different API endpoint from what you call with `curl`.

Consumption via HTTP API is generally discouraged and exists as a last resort measure. There are better
ways to retrieve queue state information, in particular via HTTP API. The same end point management UI
uses — `GET /api/queues/{vhost}/{name}` — is a much better choice.


Check out the latest episode of Treebo Comedy Trips - Travelling Solo in India

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Alex Dellinger

unread,
Mar 18, 2019, 3:34:28 PM3/18/19
to rabbitmq-users
I am having a similar issue.  Newly installed RabbitMQ environment with HA configuration.  Messages are being processed but Management UI is not updating correctly.  Occasionally it will show 1 message queued...  I checked the HTTP Queues API and I see detail under the message_stats.

Any suggestions?  Windows Server, .NET, Rabbit 3.7.11, Erlang 21.0.1


"message_stats": {"ack": 3696,"ack_details": {"rate": 0.4},"deliver": 3696,"deliver_details": {"rate": 0.4},"deliver_get": 3696,"deliver_get_details": {"rate": 0.4},"deliver_no_ack": 0,"deliver_no_ack_details": {"rate": 0},"get": 0,"get_details": {"rate": 0},"get_no_ack": 0,"get_no_ack_details": {"rate": 0},"publish": 3600,"publish_details": {"rate": 0.4},"redeliver": 0,"redeliver_details": {"rate": 0}
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.
UI_Snap.PNG

Michael Klishin

unread,
Mar 18, 2019, 3:55:37 PM3/18/19
to rabbitmq-users
Please start a new thread for your question.

It would be great to hear what specific evidence do you have of stats not updating correctly. It's not
something we see reported on this list, at least not for 3.7 series.

Luke Bakken

unread,
Mar 18, 2019, 3:57:05 PM3/18/19
to rabbitmq-users
Hi Alex,

I'm not exactly sure what the issue is. When the UI shows one message in the "Ready" state it just means that it hasn't yet been delivered to the consumer. Stats are updated on an interval so, depending on our publish / consume rate, you may never see any messages in the "Ready" state in the UI as they are immediately consumed.

Thanks,
Luke

Alex Dellinger

unread,
Mar 18, 2019, 4:14:51 PM3/18/19
to rabbitm...@googlegroups.com
OK.  I think we are good then, consumers are just running at an "incredible rate of speed". :)  Confirmed by simply shutting them down and watching the queue stats creep up.

Thanks!

--
Reply all
Reply to author
Forward
0 new messages