rabbitmq - detecting "idle" queue

2.5k views Asked by At

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?

1

There are 1 answers

4
Gabriele Santomaggio On

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",