private void asyncProduce(Message message) throws TubeClientException, InterruptedException {
            messageProducer.sendMessage(message, new MessageSentCallback() {

                @Override
                public void onMessageSent(MessageSentResult result) {
                    if (!result.isSuccess()) {
                        System.out.println("async send message failed : " + result.getErrMsg());
                    } else {
                        msgCount.getAndIncrement();
                    }
                }

                @Override
                public void onException(Throwable e) {
                    System.out.println("async send message error : " + e);
                }
            });
        }
Send messages in asynchronous mode

@param message  Message to send
@throws TubeClientException
@throws InterruptedException
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/tools/cli/MessageCommand.java