Set a lower prefetch buffer on ActiveMQ as each consumer polls in 1000
messages by default.

On Thu, Nov 24, 2016 at 2:54 PM, Oliver Wulff <owu...@talend.com> wrote:
> Hi there
>
>
> I've deployed a camel route in Karaf 4.0.3 which is configured to consume
> JMS messages in parallel (concurrentConsumers=2, maxConcurrentConsumers=6).
> But Camel consumes the messages sequentially only. I've created a testcase
> which depends on a ConnectionFactory managed by Karaf (MOM, ActiveMQ). The
> testcase contains two routes. The route 'jms-produce' produces jms messages
> every 200ms whereas 'jms-consume' consumes the messages with a delay of 5
> seconds. The testcase illustrates that messages are processed sequentially.
>
>
> 2016-11-24 14:36:57,696 | INFO  | nsole user karaf | OsgiSpringCamelContext
> | 161 - org.apache.camel.camel-core - 2.15.4 | Route: jms-consume started
> and consuming from:
> Endpoint[jms://queue:TEST?concurrentConsumers=2&maxConcurrentConsumers=6]
> 2016-11-24 14:36:57,756 | INFO  | msConsumer[TEST] | jms-consume
> | 161 - org.apache.camel.camel-core - 2.15.4 | JMS message consumed
> ID-ubuntu-wuol-49091-1479978003649-7-297
> 2016-11-24 14:37:02,761 | INFO  | msConsumer[TEST] | jms-consume
> | 161 - org.apache.camel.camel-core - 2.15.4 | JMS message successfully
> processed ID-ubuntu-wuol-49091-1479978003649-7-297
> 2016-11-24 14:37:02,763 | INFO  | msConsumer[TEST] | jms-consume
> | 161 - org.apache.camel.camel-core - 2.15.4 | JMS message consumed
> ID-ubuntu-wuol-49091-1479978003649-7-298
> 2016-11-24 14:37:07,764 | INFO  | msConsumer[TEST] | jms-consume
> | 161 - org.apache.camel.camel-core - 2.15.4 | JMS message successfully
> processed ID-ubuntu-wuol-49091-1479978003649-7-298
> 2016-11-24 14:37:07,766 | INFO  | msConsumer[TEST] | jms-consume
> | 161 - org.apache.camel.camel-core - 2.15.4 | JMS message consumed
> ID-ubuntu-wuol-49091-1479978003649-7-299
> 2016-11-24 14:37:12,770 | INFO  | msConsumer[TEST] | jms-consume
> | 161 - org.apache.camel.camel-core - 2.15.4 | JMS message successfully
> processed ID-ubuntu-wuol-49091-1479978003649-7-299
> 2016-11-24 14:37:12,772 | INFO  | msConsumer[TEST] | jms-consume
> | 161 - org.apache.camel.camel-core - 2.15.4 | JMS message consumed
> ID-ubuntu-wuol-49091-1479978003649-7-300
> 2016-11-24 14:37:17,775 | INFO  | msConsumer[TEST] | jms-consume
> | 161 - org.apache.camel.camel-core - 2.15.4 | JMS message successfully
> processed ID-ubuntu-wuol-49091-1479978003649-7-300
> 2016-11-24 14:37:17,777 | INFO  | msConsumer[TEST] | jms-consume
> | 161 - org.apache.camel.camel-core - 2.15.4 | JMS message consumed
> ID-ubuntu-wuol-49091-1479978003649-7-301
>
> What am I doing wrong? Thanks for any hints.
>
>
> Thanks
>
> Oli



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to