// setup state as attachment on the channel, so we can access the state later when needed
channel.setAttachment(new NettyCamelState(producerCallback, exchange));
// write body
NettyHelper.writeBodyAsync(LOG, channel, null, body, exchange, new ChannelFutureListener() {
public void operationComplete(ChannelFuture channelFuture) throws Exception {
LOG.trace("Operation complete {}", channelFuture);
if (!channelFuture.isSuccess()) {
// no success the set the caused exception and signal callback and break
exchange.setException(channelFuture.getCause());