// send the exchange using the processor
StopWatch watch = new StopWatch();
try {
EventHelper.notifyExchangeSending(exchange.getContext(), exchange, endpoint);
// ensure we run in an unit of work
Producer target = new UnitOfWorkProducer(producer);
target.process(exchange);
} catch (Throwable e) {
// ensure exceptions is caught and set on the exchange
exchange.setException(e);
} finally {
// emit event that the exchange was sent to the endpoint