I tested this morning and can confirm: it was a prefetch-related issue.
I modified the route as:
<from
uri="activemq://item_updates?concurrentConsumers=20&destination.consumer.prefetchSize=1"
/>
<delay><constant>5000</constant></delay>
<log message="item ${header.item_id}" />
and now each of 20 concurrent consumers gets a message first then they all
"delay" together.
The relevant piece, which I was missing, is mentioned on
http://activemq.apache.org/what-is-the-prefetch-limit-for.html - the default
prefetch limit for persistent queues (my case) is 1,000. I had less than
1,000 messages in the queue, so they were all prefetched by the first of 20
concurrent consumers.
--
View this message in context:
http://camel.465427.n5.nabble.com/Understanding-ActiveMQ-consumer-with-concurrentConsumers-tp5744590p5744621.html
Sent from the Camel - Users mailing list archive at Nabble.com.