I have my RouteBuilder doing this:

from(tibco)
   .threads(readerThreads)
   .to("direct:localqueue");
from("direct:localqueue")
   .threads(processThreads)
   .bean(MyParser.class, "parseMessage")
   .bean(MyPersistor.class, "persistRecord");


If I set processThread > 20, I get the following exception:

org.apache.camel.FailedToCreateRouteException: Failed to create route route2
at: >>> Threads[[Bean[com.sabre.clr.subscriber.metrics.MetricsParser],
Bean[com.sabre.clr.subscriber.metrics.MetricsPersistor]]] <<< in route:
Route[[From[direct://metrics]] -> [Threads[[Bean[com.sabre.c... because of
MaxPoolSize must be >= corePoolSize, was 20 >= 25


I have found some docs and examples for setting a poolsize on a toAsync()
method call but nothing about setting the poolsize on a from() method call.
How do I fix this? Also, it needs to be done in real code, not in some XML
file.

Reply via email to