user3599803
user3599803

Reputation: 7044

rabbitmq - detecting "idle" queue

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

Answers (1)

Gabriele Santomaggio
Gabriele Santomaggio

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

Related Questions