Channel channel = getChannel(leaderChannel);
sendSlaveMonitorInfoEvent.setChannel(channel);
ChannelFuture channelFuture = channel.write(sendSlaveMonitorInfoEvent);
channelFuture.addListener(new ChannelFutureListener() {
public void operationComplete(ChannelFuture future) {
if (!future.isSuccess()) {
responseQueue.remove(event.getSequence());
logger.error("Slavesocket write error when trying to get tasks from master.", future.getCause());
future.getChannel().close();