Is there an API for listing queues and exchanges on RabbitMQ?
        Posted  
        
            by parsenome
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by parsenome
        
        
        
        Published on 2010-05-15T13:36:00Z
        Indexed on 
            2010/05/15
            17:04 UTC
        
        
        Read the original article
        Hit count: 313
        
I've looked quite a bit, but I haven't been able to find a good programmatic way to list the queues on a RabbitMQ server.
This is important because I need to clean up my queues and exchanges when I'm done with them. I don't always have a good "done" event that can be used to trigger a cleanup, so I'd like to do it with more of a garbage collection model. If I can list the queues, I can verify that the objects that they're related to shouldn't be producing more entries and clean them up.
I know I can use rabbitmqctl to do it, but that needs elevated privileges.
Since I haven't been able to find a way to list the queues programmatically, I've been keeping a list of names in the database. That works, but it's ugly.
© Stack Overflow or respective owner