boolean shutdownThreadPool = ProcessorDefinitionHelper.willCreateNewThreadPool(routeContext, this, isParallelProcessing());
ExecutorService threadPool = ProcessorDefinitionHelper.getConfiguredExecutorService(routeContext, "Aggregator", this, isParallelProcessing());
if (threadPool == null && !isParallelProcessing()) {
// executor service is mandatory for the Aggregator
// we do not run in parallel mode, but use a synchronous executor, so we run in current thread
threadPool = new SynchronousExecutorService();
shutdownThreadPool = true;
}
AggregateProcessor answer = new AggregateProcessor(routeContext.getCamelContext(), processor,
correlation, strategy, threadPool, shutdownThreadPool);