private void checkMode(boolean add) {
        if (addmode != add) {
            throw new RuntimeException(
                    addmode ? "illegal operation in add mode !!!"
                            : "illegal operation in parse mode !!!");
        }
    }
add msg
@param attr
@param data
@return
inlong-common/src/main/java/org/apache/inlong/common/msg/InLongMsg.java