I had the following xml code in my spring-config.xml
You can add container.setConcurrentConsumers(10);
, where number of consumers is 10
The namespace is just a convenience - each <jms:listener/>
element gets its own DMLC
; the outer (container) element is just a vehicle to supply common attributes.
You can add multiple annotations, each with its own concurrency.
@JmsListener(id="1", destination = "mydestination", containerFactory = "myfactory", concurrency ="1-5")
@JmsListener(id="2", destination = "mydestination", containerFactory = "myfactory", concurrency = "3-5")