// Create exchange for target
MessageExchange tme = getExchangeFactory().createExchange(exchange.getPattern());
// Now copy input to new exchange
// We need to read the message once for finding routing target
// so ensure we have a re-readable source
NormalizedMessage in = MessageUtil.copyIn(exchange);
MessageUtil.transferToIn(in, tme);
// Retrieve target
ExchangeTarget target = getDestination(tme);
target.configureTarget(tme, getContext());
// Send in to target
sendSync(tme);
// Send back the result
if (tme.getStatus() == ExchangeStatus.DONE) {
done(exchange);
} else if (tme.getStatus() == ExchangeStatus.ERROR) {
fail(exchange, tme.getError());
} else if (tme.getFault() != null) {
Fault fault = MessageUtil.copyFault(tme);
done(tme);
MessageUtil.transferToFault(fault, exchange);
sendSync(exchange);
} else if (tme.getMessage("out") != null) {
NormalizedMessage out = MessageUtil.copyOut(tme);
done(tme);
MessageUtil.transferToOut(out, exchange);
sendSync(exchange);
} else {
done(tme);