Unusual ingress message rate values reported from GET /api/queues/{name} #8419
Replies: 4 comments 12 replies
-
I'm afraid that's not enough information to suggest anything specific. The commended monitoring solution is Prometheus (or a compatible tool), to the point Metric samples are emitted periodically. HTTP API then aggregates them across all nodes. The chart does not contain any values that would be in the 700+ range. My best guess is that some Assuming that you use this for backlog monitoring, a single reported value is not going to be useful in practice. It would make you depend too much on the specific moment the value is retrieved. |
Beta Was this translation helpful? Give feedback.
-
Given a quorum queue named c = Bunny.new; c.start
ch = c.create_channel
qq = ch.quorum_queue("qq.1")
loop { qq.publish(""); sleep 1 } and I monitor the rate using for i in {1..1000}; do curl -X GET -s -u guest:guest http://localhost:15672/api/queues/%2F/qq.1 | jq ".message_stats.publish_details"; sleep 1; done The output is
|
Beta Was this translation helpful? Give feedback.
-
When I change the publishing rate to be about 5 messages per second loop { qq.publish(""); sleep 0.2 } I get the following:
|
Beta Was this translation helpful? Give feedback.
-
I've also tried with different message rates, different number of publishers and some other modifications and never seen a value higher than expected. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
I'm experiencing some alarming inconsistencies with the queue message rate metrics from the management API which I'm depending on very heavily.
I'm finding that rate is occasionally reported as an incorrect value, orders of magnitude more than it really is.
To demonstrate, I submitted 3 messages, separated by a few seconds, to an exchange to which a queue is subscribed.
I have a while loop hitting the endpoint to monitor the publish stats over this time period.
This is the output- I've removed the duplicate output to keep it readable
For the first message, the rate didn't change, it remained zero
For the second message, I saw an 8 second period of rate: 0.2
For the third message, I saw a 7 second period of rate: 740
Here is a screencap of the rabbit ui for this queue, capturing this activity.

RabbitMQ 3.11.15
Erlang 25.3.2
Deployed on kubernetes using the bitnami rabbit-cluster-operator, version, chart version 3.3.2
Exchange is of topic type, queue is durable, quorum type. There's nothing else using the exchange or queue when I test.
Reproduction steps
This issue doesn't reproduce consistently
Assuming the setup in my description:
/api/queues/%2F/myQueue
endpoint for metrics (.message_stats.publish_details)rate
spike to an usually high valueExpected behavior
rate
should be a value which reasonably reflect the rate of messagesAdditional context
I've reproduced this issue about 7 times (I ran approx 50 tests), here are the unique rate values I yielded, the 0.4, 0.6 values had 2-3 messages submitted at once, respectively, so they can be ignored
"rate":0
"rate":0.2
"rate":0.4
"rate":0.6
"rate":730.4
"rate":731
"rate":731.2
"rate":734.8
"rate":740
"rate":743.4
Beta Was this translation helpful? Give feedback.
All reactions