I looked quite a bit, but I could not find a good programmatic way to list the queues on the RabbitMQ server.
This is important because I need to clear my lines and exchanges when I am done with them. I don’t always have a good “ready-made” event that can be used to trigger a cleanup, so I would like to do this with most of the garbage collection model. If I can list the queues, I can verify that the objects with which they are associated should not create more records and clear them.
I know that I can use rabbitmqctlfor this, but this requires elevated privileges.
Since I could not find a way to list the queues programmatically, I saved the list of names in the database. It works, but it is ugly.
source
share