camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Babak Vahdat <>
Subject Re: Threading Model in Camel
Date Mon, 23 Jan 2012 15:05:44 GMT

Am 23.01.12 14:56 schrieb "thestubborncamel" unter

>Thanks for that clarification again. that helps a lot.
>Extending this discussion a bit -
>If I were to generalize it, the ³consumer² thread at the appropriate
>from-endpoint-transport is what is used to complete the route
>i.e. if incoming requests is a http(jetty server) endpoint, route
>execution is done on the consumer threads managed by jetty. (and you
>would have to configure those thread pools in
>'org.eclipse.jetty.util.thread.ThreadPool' and not through the managed
>thread pools that Camel creates.)


>Likewise, for JMS transport, the route is completed on the consumer
>thread of the JMS consumer. The concurrency or thread pool for JMS
>from-endpoint is configured using  jms:MyQueue?concurrentConsumers=NN.

Also in case of JMS concurrentConsumers it's similar to Jetty as well,
that's this option is delegated to Spring JMS
DefaultMessageListenerContainer which creates it's *own* worker threads
for that option. So that Camel's managed thread pool(s) doesn't effect
anything here at all.

>So - then - seems like any camel managed thread pools are used
>primarily for parallel processing of beans or async handling within
>the camel route.

Yes, like the SEDA component making use of the Camel's managed thread
pools which is simply leveraging of the JDK concurrency API.

>Woud that be a fair statement? any corrections or further thoughts?

And you can also hook in your custom ThreadPoolFactory [1] in case you
intend not
to make use of the leveraged JDK concurrency API. For example in a JEE
setup an implementation of yours could make use of the WorkerManager [2]


>On 1/22/12, Babak Vahdat [via Camel]
><> wrote:
>> Yes!
>> The processing of the incoming requests by Jetty are done inside threads
>> managed by the thread pools of the type
>> 'org.eclipse.jetty.util.thread.ThreadPool' and not through the managed
>> thread pools that Camel creates.
>> Babak
>> _______________________________________________
>> If you reply to this email, your message will be added to the discussion
>> below:
>> To unsubscribe from Threading Model in Camel, visit
>Rama Raghavan
>Mobile: (972) 273-9875
>View this message in context:
>Sent from the Camel - Users mailing list archive at

View raw message