Hi, 

I have defined a route to take messages from activemq and do some processing
and send it to other end point. I have configured thread pool so that many
threads pick up messages from the activemq and process it in parallel. But
this is not happening. 

>From the logs I could figure out that the messages are not picked up in
parallel. Only after the first message if processed (by thread 1) and
delivered to the end system, the next message is picked up (by thread 2).
Here is the code snippet. 

*from(ACTIVEMQ_QUEUE)
                .threads().executorServiceRef(bigpool)
*                .log(LoggingLevel.INFO, 'Thread started')
                *.processRef('Processor')*
                .log(LoggingLevel.INFO, 'Sending to MPI')
               * .to(TCP_ENDPOINT)
                .processRef('Processor2')
                .to(TCP_ENDPOINT2)*
                .log(LoggingLevel.INFO, 'completed')
               * .end()*


Threadpool is defined in the camel context file as:
<camel:threadPoolProfile id="myDefaultProfile"
                           defaultProfile="true"
                           maxPoolSize="50"/>
        <camel:threadPoolProfile id="bigPool" maxPoolSize="5"/>

Ideally I could seee various threads are picking up the messages (like
thread #8, thread #20, ....) but they are not picked up in parallel instead
they are picking up message in sequence (after processing the first message,
second is picked up from the queue). 

Please help me to make the threads pick up messages and process them in
parallel.  

Thanks in advance,
Hema 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Routes-Multi-threading-nor-running-parallel-tp5721385.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to