public void addMsgCount(final String topicName, int msgCnt) {
        if (msgCnt > 0) {
            AtomicLong currCount = counterMap.get(topicName);
            if (currCount == null) {
                AtomicLong tmpCount = new AtomicLong(0);
                currCount = counterMap.putIfAbsent(topicName, tmpCount);
                if (currCount == null) {
                    currCount = tmpCount;
                }
            }
            // Indicator output every 1000
            if (currCount.addAndGet(msgCnt) % 1000 == 0) {
                if (isProducer) {
                    logger.info("Sent " + topicName + " messages:" + currCount.get());
                } else {
                    logger.info("Received " + topicName + " messages:" + currCount.get());
                }
            }
        }
    }
Record the number of messages by topicName dimension

@param topicName   topic name
@param msgCnt      message count
inlong-tubemq/tubemq-example/src/main/java/org/apache/inlong/tubemq/example/MsgSendReceiveStats.java