简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM