public Processor createProcessor(final RouteContext routeContext) throws Exception {
// create the output processor
output = this.createChildProcessor(routeContext, true);
// add the output as a intercept strategy to the route context so its invoked on each processing step
routeContext.getInterceptStrategies().add(new InterceptStrategy() {
private Processor interceptedTarget;
public Processor wrapProcessorInInterceptors(CamelContext context, ProcessorDefinition<?> definition,
Processor target, Processor nextTarget) throws Exception {
// store the target we are intercepting