// store the last to endpoint as the failure endpoint
exchange.setProperty(Exchange.FAILURE_ENDPOINT, exchange.getProperty(Exchange.TO_ENDPOINT));
// the failure processor could also be asynchronous
AsyncProcessor afp = AsyncProcessorConverterHelper.convert(processor);
sync = AsyncProcessorHelper.process(afp, exchange, new AsyncCallback() {
public void done(boolean sync) {
log.trace("Failure processor done: {} processing Exchange: {}", processor, exchange);
try {
prepareExchangeAfterFailure(exchange, data, shouldHandle, shouldContinue);