Hi You can read about thread stuff here http://camel.apache.org/threading-model.html
You can also share thread pools among the routes. Or reduce the sizes of the thread pool profiles etc. Also some Camel components have consumers that support parallel processing such as seda / jms / jetty / cxf etc. You can also configure their thread pool settings On Wed, Jun 19, 2013 at 6:54 AM, vkarkhanis <vkarkha...@gmail.com> wrote: > Hello, > As I learnt, each route in camel runs in its own thread unless its a direct > endpoint. We have a configuration, where we have 14 different routes inside > the camel context: > > We are seeking clarification on following points: > > 1. the defaultThreadPolicy has poolSize="10" maxPoolSize="20". Does that > mean that maximum of 10 threads will be executing the 10 routes at a time > out of the 14 configured. If yes, can we override this configuration using > <threadPoolProfile> such that poolSize="5" maxPoolSize="5" do that there are > only 5 threads which execute 5 different routes at a given point in time ? > 2. Is there any way by which we can limit the number of thread spawned to > executes routes ? > > We are seeking the above information, because we are encountering out of > memory exception. The reason for this, as we see is, there is a customized > Publish-Subscribe mechanism and we have converted that to a customized > endpoint. This endpoint is used in 14 different routes and we get messages > on all of these endpoints which are processed. Since everything is in the > same camel context, we run out of memory during this parallel processing. > > This is where we need to limit number of threads which process the routes in > parallel. > > Appreciate any help. > > Thank you, > Regards > > vkarkhanis > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-routes-and-threads-tp5734326.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- www.camelone.org: The open source integration conference. Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen