Stream content expiration's effects on the Ready message count #10824
-
Describe the bugwhen the rabbit server is using streams, all streams offset are added to the number of "ready" messages. That means, that the number of ready messages will always only increase with time, not event taking the max age into account. That mixes the stream behavior (offset only increases) with queues behavior (wants to be empty), and makes dashboard and monitoring hard. Both management-plugin , the prometheus metrics and the RabbitMQ official Grafana dashboard show the same effects: the number of ready messages becomes useless and grafana will always have it in Red as it wants that number to be low. Reproduction steps
Expected behaviorthe count of ready message should at least decrease when max-age for a message is reached and it's not available for consumption anymore. Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
It's a good question whether there should be separate counters for queues and streams. However, we cannot reproduce the behavior with the metrics: as data is expired, the metric is correctly updated (goes down) in both management UI and the Prometheus endpoint. Here is what the person who's tried to reproduce observes: |
Beta Was this translation helpful? Give feedback.
-
That is interesting. Here is what I see on my setup: The same happens to all streams. they are part of a superstream. As you can see, max-age is set to a day. no messages are being sent to this superstream for a week already. The consumers are still connected and the offset lag of the active consumer is 0. Still, all of them still show as 'ready' We started using superstreams in our system gradually in march ... March 14 we completely replaced the queues for streams for one set of events.. And you can see in the graph that there were never a decrease in the number of ready messages since then. The server is running rabbitmq 3.12.10 and erlang 25.3.2.7 |
Beta Was this translation helpful? Give feedback.
here is the document section which explains how and when stream data is actually deleted: https://www.rabbitmq.com/docs/streams#retention