Last active
December 7, 2015 21:51
-
-
Save semenodm/0e469a07335db10af3c1 to your computer and use it in GitHub Desktop.
write body
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // write body | |
| NettyHelper.writeBodyAsync(LOG, channel, remoteAddress, body, exchange, new ChannelFutureListener() { | |
| public void operationComplete(ChannelFuture channelFuture) throws Exception { | |
| LOG.trace("Operation complete {}", channelFuture); | |
| if (!channelFuture.isSuccess()) { | |
| // no success then exit, (any exception has been handled by ClientChannelHandler#exceptionCaught) | |
| return; | |
| } | |
| // if we do not expect any reply then signal callback to continue routing | |
| if (!configuration.isSync()) { | |
| try { | |
| //some logic | |
| } finally { | |
| // signal callback to continue routing | |
| producerCallback.done(false); | |
| } | |
| } | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment