[rabbitmq-discuss] /api/queue message_stats->deliver_get_details->last_event removed in 3.1?
simon at rabbitmq.com
Thu Feb 20 12:10:28 GMT 2014
On 19/02/14 19:53, Jeff wrote:
> I use message_stats->deliver_get_details->last_event to keep track of
> a queue that may have stalled consumers. some of our requests take
> some time to process, so it normal to have some unack’d ones laying
> around for a while.
So last_event was removed because it was really an implementation detail
of how statistics used to work, before they got rewritten in 3.1.0. It's
really the most recent time that the management DB received a statistics
event from a channel - but various things you might not expect could
wake up a channel and get it to sent statistics events.
For example, if someone somewhere wrote a script which polled
"rabbitmqmctl list_channels", then that would cause last_event to keep
> is there a replacement for this? I see ->rate, but I can’t figure out
> what the rate is over? per second? what if some requests take many
> seconds to run?
So rate is probably what you want. The rate key is just calculated over
the last five seconds. If you want the rate over a longer period, you
can set the msg_rates_age and msg_rates_incr query parameters, and as
well as getting a bunch of samples back you will also get an avg_rate
field giving you the average over the time period.
Note sure what you mean by "what if some requests take many seconds to
run?" - as far as the management API is concerned it's just counting
messages out and acks in; it doesn't make any attempt to correlate them.
More information about the rabbitmq-discuss