Hi Your design is probably not good when you need to create a new route to process each message.
Instead reuse the route(s) and use the dynamic EIPs if you need to process the messages a bit differently. http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html On Sun, May 12, 2013 at 9:10 AM, hussainpirosha <hussain.piro...@gmail.com> wrote: > Hi, > > I am using camel to implement dispatcher EIP. There are thousands of > messages in a queue which needs to be delivered at different URLs. Each > message has its own delivery URL and delivery protocol (ftp,email,http etc). > > The way we are implementing in Camel is > - Boot a single camel context, the context is disabled for JMX and the > loadStatisticsEnabled is set to false on the ManagementStrategy. As > mentioned in a jira issue, addressed in 2.11.0 version, for disabling the > background management thread creation. > - For each message a route is being constructed , the message is being > pushed to the route for delivery. > - After the message is processed route is shutdown and removed from context. > > We did a small perf test by having 200 threads of dispatcher component, each > sharing the same context. > Observed that the time to start a route increases upto a maximum of 60 > seconds while the time to process is in milliseconds. > > Issue CAMEL-5675 mentions that this has been fixed but we are still > observing significant time being taken in starting up routes. > > Pls suggest, what should we do to solve this. > > The route that we are creating for http is > > from("direct:"+dispatchItem.getID()).toF("%s?httpClient.soTimeout=%s&disableStreamCache=true", > dispatchItem.getEndPointURL(),timeOutInMillis); > > Each dispatchItem has a unique ID. > > Thanks, > Hussain > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Slow-startup-of-routes-tp5732356.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