Reputation: 409
I am building a spring boot based application, where it listens to the rabbit. You can pass some command line arguments which will make the application listens to various queues. Is there any way to handle this kind of scenario ?
I am referring to link as example.
Upvotes: 1
Views: 271
Reputation: 121177
Try to do like this:
@RabbitListener(queues = "${rabbit.listener.queue}")
and the command line args like:
--rabbit.listener.queue=foo
See @RabbitListener.queues()
JavaDocs for more information and Spring Boot Command Line access.
Upvotes: 1