delete queues without consumer

292 views
Skip to first unread message

seigh...@gmail.com

unread,
Feb 22, 2022, 12:09:09 AM2/22/22
to rabbitmq-users
hi everyone

how can i delete queues with these conditions?
1- queues without consumer
2- and messages bigger than 300 or more.

 thanks inadvance

Wes Peng

unread,
Feb 22, 2022, 12:16:30 AM2/22/22
to rabbitm...@googlegroups.com
You can use HTTP API to find the metrics for which you can decide the deletion policy.


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/6231253a-9cac-4687-855f-7748b8493d03n%40googlegroups.com.

Terry Rinck

unread,
Feb 22, 2022, 9:50:01 AM2/22/22
to rabbitm...@googlegroups.com
Are empty queues without consumers, or queues with less than 300 (messages, or bytes?) supposed to stick around? Can I ask why these larger queues are specifically targeted?

I would imagine a combination of autodelete and ttl would accomplish what you want, either at queue declare or as a vhost policy. 



jo...@cloudamqp.com

unread,
Feb 25, 2022, 3:19:30 PM2/25/22
to rabbitmq-users
For 1.
curl -XDELETE https://USERNAME:PASSWORD@HOST/api/queues/VHOST/QUEUE_NAME -G -d 'if-unused=true'

/Johan
Reply all
Reply to author
Forward
0 new messages