You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by je73 <jo...@rockersdigest.com> on 2014/10/09 14:42:43 UTC

JMS/ActiveMQ concurrent threads not starting for messages already in the queue

Hi,

I've got a problem with starting concurrent threads (JMS/ActiveMQ) for
messages already in the queue.

I have two test apps, Producer and Consumer.
The producer creates 10 message and the consumer reads messages with
"<camel:from
uri="activemq:TestQueue?concurrentConsumers=10&amp;maxConcurrentConsumers=20"
/>

Now, if I start the consumer app first and then the producer I see 10
threads logging messages read of the queue at a time.

However, if I start the producer and then the consumer it only reads one
message at a time. (ActiveMQ web interface is showing 10 consumers though).

If after scenario 2 I run the producer, 10 messages are read until those
messages are gone and it goes back to 1 msg at a time for the remainders of
the first producer run.

Any ideas?




--
View this message in context: http://camel.465427.n5.nabble.com/JMS-ActiveMQ-concurrent-threads-not-starting-for-messages-already-in-the-queue-tp5757447.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JMS/ActiveMQ concurrent threads not starting for messages already in the queue

Posted by je73 <jo...@rockersdigest.com>.
I found that adding "destination.consumer.prefetchSize=1" to the from
statement fixed this.



--
View this message in context: http://camel.465427.n5.nabble.com/JMS-ActiveMQ-concurrent-threads-not-starting-for-messages-already-in-the-queue-tp5757447p5757510.html
Sent from the Camel - Users mailing list archive at Nabble.com.