public static void main(String[] args) {
        CliConsumer cliConsumer = new CliConsumer();
        try {
            boolean result = cliConsumer.processParams(args);
            if (!result) {
                throw new Exception("Parse parameters failure!");
            }
            cliConsumer.initTask();
            ThreadUtils.sleep(1000);
            while (cliConsumer.msgCount < 0
                    || TOTAL_COUNTER.get() < cliConsumer.msgCount * cliConsumer.clientCount) {
                ThreadUtils.sleep(cliConsumer.printIntervalMs);
                System.out.println("Continue, cost time: "
                        + (System.currentTimeMillis() - cliConsumer.startTime)
                        + " ms, required count VS received count = "
                        + (cliConsumer.msgCount * cliConsumer.clientCount)
                        + " : " + TOTAL_COUNTER.get());
                for (Map.Entry<String, AtomicLong> entry : TOPIC_COUNT_MAP.entrySet()) {
                    System.out.println("Topic Name = " + entry.getKey()
                            + ", count=" + entry.getValue().get());
                }
            }
            cliConsumer.shutdown();
            System.out.println("Finished, cost time: "
                    + (System.currentTimeMillis() - cliConsumer.startTime)
                    + " ms, required count VS received count = "
                    + (cliConsumer.msgCount * cliConsumer.clientCount)
                    + " : " + TOTAL_COUNTER.get());
            for (Map.Entry<String, AtomicLong> entry : TOPIC_COUNT_MAP.entrySet()) {
                System.out.println("Topic Name = " + entry.getKey()
                        + ", count=" + entry.getValue().get());
            }
        } catch (Throwable ex) {
            ex.printStackTrace();
            logger.error(ex.getMessage());
            cliConsumer.help();
        }

    }
Consume messages called by the tubemq-consumer-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/CliConsumer.java