Java – Spring RabbitMQ get all declared queues

javarabbitmqspring

I'm trying to get a list of all declared queues for a particular Virtual Host, using spring Rabbit libraries. But I can't see how you do it. There does exist a RabbitAdmin class which allows you to declare a queue, but you can't retrieve a list of existing queues.

Any ideas?

Thanks.

Best Answer

You won't be able to do this from the Spring/Java client.

Instead there is a REST API which is part of the Management plugin http://www.rabbitmq.com/management.html

Take a look at http://hg.rabbitmq.com/rabbitmq-management/raw-file/rabbitmq_v3_0_2/priv/www/api/index.html for the full reference.

You will be interested in the section /api/queues to get all queues or /api/queues/vhost to get queues on a given vhost