Question

How to bind multiple queues names from property file to Spring POJO MDBs and connect all of them into one channel?

Was it helpful?

Solution

Assuming you are talking about JMS, you need a separate <int-jms:message-driven-adapter/> for each queue, but they can all send their messages to the same channel.

If you have a fixed number of queues, simply define the adapter for each with a property placeholder.

If you have a variable number of queues, you would need to create the adapters programmatically - you can create a child context for each with the single channel being in the parent context.

JMS (unlike AMQP/RabbitMQ) doesn't permit a consumer to consume from multiple queues. With the amqp inbound adapter, just give it a list of queues or queue names.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top