@Nullable
  final <T> Promise<T> send(int messageId, @NotNull ByteBuf message) {
    ChannelFuture channelFuture = send(message);
    if (messageId == -1) {
      return null;
    }

    AsyncPromise<T> promise = new AsyncPromise<T>().onError(error -> messageCallbackMap.remove(messageId));

    channelFuture.addListener(future -> {
      if (!future.isSuccess()) {
        Throwable cause = future.cause();
        if (cause == null) {
          promise.setError("No success"); //NON-NLS
        }
        else {
          promise.setError(cause);
        }
      }
    });
    messageCallbackMap.put(messageId, (AsyncPromise<Object>)promise);
    return promise;
  }
@Nullable
  final <T> Promise<T> send(int messageId, @NotNull ByteBuf message)