What is the velocity of the messages arriving at the queue? It might be a single consumer eating them all as fast as they are delivered. You might have a race condition. Try preloading the queue with a lot of messages before starting the route. Id be interested in the results.
*Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Wed, Nov 6, 2013 at 3:46 PM, Lothar Werzinger <[email protected]>wrote: > I am using Camel 2.12.1 (from Talend ESB 5.4) > > I am using a rather simple camel route to read from an activemq queue with > 5 concurrent consumers. > The full blueprint config is attached. > > <route> > <from uri="activemq:queue:ts-test?concurrentConsumers=5" /> > <delay> > <constant>2000</constant> > </delay> > <to uri="log:test" /> > </route> > > what I would expect is that the route would consume from the queue on 5 > different threads and that the log would show outputs where "blocks" of 5 > timestamps are close together with gaps of 2 seconds between the "blocks" > as the route uses a delay of 2 seconds to emulate processing. However what > I see is that despite requesting concurrentConsumers=5 it seems that it > processes one message at a time (each log entry is about 2 seconds apart). > > Can anyone point me into the right direction to make the route consume > concurrently? > > > 13:23:42,966 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 8] > 13:23:44,968 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 17] > 13:23:46,970 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 26] > 13:23:48,973 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 7] > 13:23:50,975 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 16] > 13:23:52,977 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 25] > 13:23:54,979 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 6] > 13:23:56,982 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 15] > 13:23:58,984 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 24] > 13:24:00,986 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 5] > 13:24:02,989 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 14] > 13:24:04,991 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 23] > 13:24:06,993 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 4] > 13:24:08,995 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 13] > 13:24:10,998 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 22] > 13:24:13,001 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 3] > 13:24:15,004 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 12] > 13:24:17,006 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 21] > 13:24:19,007 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 30] > 13:24:21,010 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 2] > 13:24:23,012 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 11] > 13:24:25,015 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 20] > 13:24:27,017 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 29] > 13:24:29,019 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 1] > 13:24:31,021 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 10] > 13:24:33,023 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 19] > 13:24:35,026 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 28] > 13:24:37,028 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 9] > 13:24:39,030 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 18] > 13:24:41,033 | INFO | onsumer[ts-test] | test > | rg.apache.camel.util.CamelLogger 176 | Exchange[ExchangePattern: InOnly, > BodyType: String, Body: Hello 27] > > > Thanks in advance! > -- > > Lothar Werzinger > > Principal Architect > > Tradescape, Inc. - Enabling Efficient Digital Marketplaces > > +1-650-931-6719 (direct) > > +1-800-697-6068 (main) Ext. 116 > > [email protected]<https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]> > > http://www.tradescape.biz > > > > > This message and any attachment (the "message") is intended solely for the > addressees and is confidential. If you receive this message by mistake, > please delete it and notify the sender immediately. Any use not > in accordance with its purpose, any out-spread or disclosure, either as a > whole or partially, is prohibited except with formal approval. Internet > cannot guarantee the integrity of this message, therefore Tradescape will > not be liable for the message if modified. > > - >
