private void doFlush(final Promise<Void> onComplete) {
ZMsg msg = MSG_UPD.get(ZeroMQNetChannel.this);
MSG_UPD.compareAndSet(ZeroMQNetChannel.this, msg, null);
if (null != msg) {
boolean success = msg.send(socket);
if (null != onComplete) {
if (success) {
onComplete.onNext((Void) null);
} else {
onComplete.onError(new RuntimeException("ZeroMQ Message could not be sent"));