public static void main(String[] args) {
        CliProducer cliProducer = new CliProducer();
        try {
            boolean result = cliProducer.processParams(args);
            if (!result) {
                throw new Exception("Parse parameters failure!");
            }
            cliProducer.initTask();
            ThreadUtils.sleep(1000);
            while (cliProducer.msgCount < 0
                    || TOTAL_COUNTER.get() < cliProducer.msgCount * cliProducer.clientCount) {
                ThreadUtils.sleep(cliProducer.printIntervalMs);
                System.out.println("Continue, cost time: "
                        + (System.currentTimeMillis() - cliProducer.startTime)
                        + "ms, required count VS sent count = "
                        + (cliProducer.msgCount * cliProducer.clientCount)
                        + " : " + TOTAL_COUNTER.get()
                        + " (" + SENT_SUCC_COUNTER.get()
                        + ":" + SENT_FAIL_COUNTER.get()
                        + ":" + SENT_EXCEPT_COUNTER.get()
                        + ")");
            }
            cliProducer.shutdown();
            System.out.println("Finished, cost time: "
                    + (System.currentTimeMillis() - cliProducer.startTime)
                    + "ms, required count VS sent count = "
                    + (cliProducer.msgCount * cliProducer.clientCount)
                    + " : " + TOTAL_COUNTER.get()
                    + " (" + SENT_SUCC_COUNTER.get()
                    + ":" + SENT_FAIL_COUNTER.get()
                    + ":" + SENT_EXCEPT_COUNTER.get()
                    + ")");
        } catch (Throwable ex) {
            ex.printStackTrace();
            logger.error(ex.getMessage());
            cliProducer.help();
        }

    }
Produce messages called by the tubemq-producer-test.sh script.
@param args     Call parameter array,
                the relevant parameters are dynamic mode, which is parsed by CommandLine.
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/tools/cli/CliProducer.java