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.
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
For those reading that in 2016 - Take a look on Hop (https://github.com/rabbitmq/hop), it aims to wrap RabbitMQ management API for Java.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With