public void setAttrKeyVal(final String keyVal, final String valueVal) {
        if (TStringUtils.isBlank(keyVal)) {
            throw new IllegalArgumentException("keyVal's value is blank!");
        }
        if (TStringUtils.isBlank(valueVal)) {
            throw new IllegalArgumentException("valueVal's value is blank!");
        }
        if (keyVal.contains(TokenConstants.TOKEN_MSG_TYPE)
                || keyVal.contains(TokenConstants.TOKEN_MSG_TIME)
                || valueVal.contains(TokenConstants.TOKEN_MSG_TYPE)
                || valueVal.contains(TokenConstants.TOKEN_MSG_TIME)) {
            throw new IllegalArgumentException(new StringBuilder(512).append("System Headers(")
                    .append(TokenConstants.TOKEN_MSG_TYPE).append(",")
                    .append(TokenConstants.TOKEN_MSG_TIME)
                    .append(") are reserved tokens, can't include in keyVal or valueVal!").toString());
        }
        if ((keyVal.contains(TokenConstants.ARRAY_SEP)
                || keyVal.contains(TokenConstants.EQ))
                || (valueVal.contains(TokenConstants.ARRAY_SEP)
                        || valueVal.contains(TokenConstants.EQ))) {
            throw new IllegalArgumentException(new StringBuilder(512).append("(")
                    .append(TokenConstants.ARRAY_SEP).append(",")
                    .append(TokenConstants.EQ).append(
                            ") are reserved tokens, can't include in keyVal or valueVal!")
                    .toString());
        }
        if (TStringUtils.isBlank(this.attribute)) {
            this.attribute = keyVal + TokenConstants.EQ + valueVal;
            return;
        }
        int count = 0;
        StringBuilder sBuilder = new StringBuilder(512);
        String[] strAttrs = this.attribute.split(TokenConstants.ARRAY_SEP);
        for (String strAttrItem : strAttrs) {
            if (TStringUtils.isNotBlank(strAttrItem)) {
                String[] strItems = strAttrItem.split(TokenConstants.EQ);
                if (strItems.length > 1 && !TStringUtils.isBlank(strItems[0])) {
                    if (!keyVal.equals(strItems[0])) {
                        if (count++ > 0) {
                            sBuilder.append(TokenConstants.ARRAY_SEP);
                        }
                        sBuilder.append(strAttrItem);
                    }
                }
            }
        }
        if (count > 0) {
            sBuilder.append(TokenConstants.ARRAY_SEP);
        }
        sBuilder.append(keyVal).append(TokenConstants.EQ).append(valueVal);
        this.attribute = sBuilder.toString();
    }
Store key and value in attribute

@param keyVal    the key name
@param valueVal  the key value
inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corebase/Message.java