private int getHeaderLen() {
        int len = 4; // magic
        if (version.intValue() >= Version.v1.intValue()) {
            len += 8; // create time
        }
        if (version.intValue() == Version.v2.intValue()) {
            len += 4; // msgcnt
        }

        return len + 4; // attrcnt
    }
add msg
@param attr
@param data
@return
inlong-common/src/main/java/org/apache/inlong/common/msg/InLongMsg.java