Reputation: 7044
I'm looking for a correct way to know when queues are idle.
"idle" = no messages were published for a predefined amount of time.
How can I use the /api/queues
(or other API) for that?
Upvotes: 0
Views: 3169
Reputation: 22750
I am not sure your approach is totally correct since the statistics on the UI aren't in real-time and the value idle
indicates the generic queue activities.
btw you can use the idle_since
field:
$ curl -s -u guest:guest http://localhost:15672/api/queues/%2F/myqueue | jq '.' | grep idle_since
"idle_since": "2020-12-26 14:02:21",
Upvotes: -1