public int getMsgCnt(String attr) {
        if (addmode) {
            return this.attr2MsgBuffer.get(attr).cnt;
        } else {
            return this.attr2Rawdata.get(attr).cnt;
        }
    }
add msg
@param attr
@param data
@return
inlong-common/src/main/java/org/apache/inlong/common/msg/InLongMsg.java