本文整理了Java中org.apache.rocketmq.common.message.Message.putProperty()
方法的一些代码示例,展示了Message.putProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.putProperty()
方法的具体详情如下:
包路径:org.apache.rocketmq.common.message.Message
类名称:Message
方法名:putProperty
暂无
代码示例来源:origin: apache/rocketmq
public static void putProperty(final Message msg, final String name, final String value) {
msg.putProperty(name, value);
}
代码示例来源:origin: apache/rocketmq
public void setTags(String tags) {
this.putProperty(MessageConst.PROPERTY_TAGS, tags);
}
代码示例来源:origin: apache/rocketmq
public void setKeys(String keys) {
this.putProperty(MessageConst.PROPERTY_KEYS, keys);
}
代码示例来源:origin: apache/rocketmq
public void setBuyerId(String buyerId) {
putProperty(MessageConst.PROPERTY_BUYER_ID, buyerId);
}
代码示例来源:origin: apache/rocketmq
public void setDelayTimeLevel(int level) {
this.putProperty(MessageConst.PROPERTY_DELAY_TIME_LEVEL, String.valueOf(level));
}
代码示例来源:origin: apache/rocketmq
public void setWaitStoreMsgOK(boolean waitStoreMsgOK) {
this.putProperty(MessageConst.PROPERTY_WAIT_STORE_MSG_OK, Boolean.toString(waitStoreMsgOK));
}
代码示例来源:origin: apache/rocketmq
public void putUserProperty(final String name, final String value) {
if (MessageConst.STRING_HASH_SET.contains(name)) {
throw new RuntimeException(String.format(
"The Property<%s> is used by system, input another please", name));
}
if (value == null || value.trim().isEmpty()
|| name == null || name.trim().isEmpty()) {
throw new IllegalArgumentException(
"The name or value of property can not be null or blank string!"
);
}
this.putProperty(name, value);
}
代码示例来源:origin: apache/rocketmq
public static void setUniqID(final Message msg) {
if (msg.getProperty(MessageConst.PROPERTY_UNIQ_CLIENT_MESSAGE_ID_KEYIDX) == null) {
msg.putProperty(MessageConst.PROPERTY_UNIQ_CLIENT_MESSAGE_ID_KEYIDX, createUniqID());
}
}
代码示例来源:origin: didi/DDMQ
public static void putProperty(final Message msg, final String name, final String value) {
msg.putProperty(name, value);
}
代码示例来源:origin: didi/DDMQ
public void setBuyerId(String buyerId) {
putProperty(MessageConst.PROPERTY_BUYER_ID, buyerId);
}
代码示例来源:origin: didi/DDMQ
public void setKeys(String keys) {
this.putProperty(MessageConst.PROPERTY_KEYS, keys);
}
代码示例来源:origin: didi/DDMQ
public void setTags(String tags) {
this.putProperty(MessageConst.PROPERTY_TAGS, tags);
}
代码示例来源:origin: didi/DDMQ
public void setDelayTimeLevel(int level) {
this.putProperty(MessageConst.PROPERTY_DELAY_TIME_LEVEL, String.valueOf(level));
}
代码示例来源:origin: didi/DDMQ
public void setWaitStoreMsgOK(boolean waitStoreMsgOK) {
this.putProperty(MessageConst.PROPERTY_WAIT_STORE_MSG_OK, Boolean.toString(waitStoreMsgOK));
}
代码示例来源:origin: didi/DDMQ
public void putUserProperty(final String name, final String value) {
if (MessageConst.STRING_HASH_SET.contains(name)) {
throw new RuntimeException(String.format(
"The Property<%s> is used by system, input another please", name));
}
if (value == null || value.trim().isEmpty()
|| name == null || name.trim().isEmpty()) {
throw new IllegalArgumentException(
"The name or value of property can not be null or blank string!"
);
}
this.putProperty(name, value);
}
代码示例来源:origin: didi/DDMQ
public static void setUniqID(final Message msg) {
if (msg.getProperty(MessageConst.PROPERTY_UNIQ_CLIENT_MESSAGE_ID_KEYIDX) == null) {
msg.putProperty(MessageConst.PROPERTY_UNIQ_CLIENT_MESSAGE_ID_KEYIDX, createUniqID());
}
}
代码示例来源:origin: org.apache.rocketmq/rocketmq-common
public void setBuyerId(String buyerId) {
putProperty(MessageConst.PROPERTY_BUYER_ID, buyerId);
}
代码示例来源:origin: org.apache.rocketmq/rocketmq-common
public void setTags(String tags) {
this.putProperty(MessageConst.PROPERTY_TAGS, tags);
}
代码示例来源:origin: org.apache.rocketmq/rocketmq-common
public void putUserProperty(final String name, final String value) {
if (MessageConst.STRING_HASH_SET.contains(name)) {
throw new RuntimeException(String.format(
"The Property<%s> is used by system, input another please", name));
}
if (value == null || value.trim().isEmpty()
|| name == null || name.trim().isEmpty()) {
throw new IllegalArgumentException(
"The name or value of property can not be null or blank string!"
);
}
this.putProperty(name, value);
}
代码示例来源:origin: org.apache.rocketmq/rocketmq-common
public static void setUniqID(final Message msg) {
if (msg.getProperty(MessageConst.PROPERTY_UNIQ_CLIENT_MESSAGE_ID_KEYIDX) == null) {
msg.putProperty(MessageConst.PROPERTY_UNIQ_CLIENT_MESSAGE_ID_KEYIDX, createUniqID());
}
}
内容来源于网络,如有侵权,请联系作者删除!