CamelContext context = exchange.getContext();
try {
context.getInflightRepository().remove(exchange);
context.stopRoute(stop);
context.startRoute(start);
} catch (Exception e) {
// let the exception handle handle it, which is often just to log it
getExceptionHandler().handleException("Error flipping routes", e);
}
}