@Override protected void doStart() throws Exception { ServiceHelper.startServices(output, outputAsync, deadLetter); // use a shared scheduler if (executorService == null || executorService.isShutdown()) { // camel context will shutdown the executor when it shutdown so no need to shut it down when // stopping if (executorServiceRef != null) { executorService = camelContext .getExecutorServiceStrategy() .lookupScheduled(this, "ErrorHandlerRedeliveryTask", executorServiceRef); if (executorService == null) { throw new IllegalArgumentException( "ExecutorServiceRef " + executorServiceRef + " not found in registry."); } } else { executorService = camelContext .getExecutorServiceStrategy() .newScheduledThreadPool(this, "ErrorHandlerRedeliveryTask"); } } // determine if redeliver is enabled or not redeliveryEnabled = determineIfRedeliveryIsEnabled(); if (log.isDebugEnabled()) { log.debug("Redelivery enabled: {} on error handler: {}", redeliveryEnabled, this); } }