本文整理了Java中org.apache.rocketmq.common.message.Message.getProperty()
方法的一些代码示例,展示了Message.getProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getProperty()
方法的具体详情如下:
包路径:org.apache.rocketmq.common.message.Message
类名称:Message
方法名:getProperty
暂无
代码示例来源:origin: apache/rocketmq
public static String getUniqID(final Message msg) {
return msg.getProperty(MessageConst.PROPERTY_UNIQ_CLIENT_MESSAGE_ID_KEYIDX);
}
代码示例来源:origin: apache/rocketmq
public static String getOriginMessageId(final Message msg) {
return msg.getProperty(MessageConst.PROPERTY_ORIGIN_MESSAGE_ID);
}
代码示例来源:origin: apache/rocketmq
public static String getTransferFlag(final Message msg) {
return msg.getProperty(MessageConst.PROPERTY_TRANSFER_FLAG);
}
代码示例来源:origin: apache/rocketmq
public static String getConsumeStartTimeStamp(final Message msg) {
return msg.getProperty(MessageConst.PROPERTY_CONSUME_START_TIMESTAMP);
}
代码示例来源:origin: apache/rocketmq
public String getKeys() {
return this.getProperty(MessageConst.PROPERTY_KEYS);
}
代码示例来源:origin: apache/rocketmq
public static String getCorrectionFlag(final Message msg) {
return msg.getProperty(MessageConst.PROPERTY_CORRECTION_FLAG);
}
代码示例来源:origin: apache/rocketmq
public String getUserProperty(final String name) {
return this.getProperty(name);
}
代码示例来源:origin: apache/rocketmq
public static String getMQ2Flag(final Message msg) {
return msg.getProperty(MessageConst.PROPERTY_MQ2_FLAG);
}
代码示例来源:origin: apache/rocketmq
public static String getReconsumeTime(final Message msg) {
return msg.getProperty(MessageConst.PROPERTY_RECONSUME_TIME);
}
代码示例来源:origin: apache/rocketmq
public static String getMaxReconsumeTimes(final Message msg) {
return msg.getProperty(MessageConst.PROPERTY_MAX_RECONSUME_TIMES);
}
代码示例来源:origin: apache/rocketmq
public String getTags() {
return this.getProperty(MessageConst.PROPERTY_TAGS);
}
代码示例来源:origin: apache/rocketmq
public String getBuyerId() {
return getProperty(MessageConst.PROPERTY_BUYER_ID);
}
代码示例来源:origin: apache/rocketmq
public boolean isWaitStoreMsgOK() {
String result = this.getProperty(MessageConst.PROPERTY_WAIT_STORE_MSG_OK);
if (null == result)
return true;
return Boolean.parseBoolean(result);
}
代码示例来源:origin: apache/rocketmq
public int getDelayTimeLevel() {
String t = this.getProperty(MessageConst.PROPERTY_DELAY_TIME_LEVEL);
if (t != null) {
return Integer.parseInt(t);
}
return 0;
}
代码示例来源: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 int getDelayTimeLevel() {
String t = this.getProperty(MessageConst.PROPERTY_DELAY_TIME_LEVEL);
if (t != null) {
return Integer.parseInt(t);
}
return 0;
}
代码示例来源:origin: didi/DDMQ
public boolean isWaitStoreMsgOK() {
String result = this.getProperty(MessageConst.PROPERTY_WAIT_STORE_MSG_OK);
if (null == result)
return true;
return Boolean.parseBoolean(result);
}
代码示例来源:origin: apache/rocketmq
final String tranMsg = msg.getProperty(MessageConst.PROPERTY_TRANSACTION_PREPARED);
if (tranMsg != null && Boolean.parseBoolean(tranMsg)) {
sysFlag |= MessageSysFlag.TRANSACTION_PREPARED_TYPE;
context.setMessage(msg);
context.setMq(mq);
String isTrans = msg.getProperty(MessageConst.PROPERTY_TRANSACTION_PREPARED);
if (isTrans != null && isTrans.equals("true")) {
context.setMsgType(MessageType.Trans_Msg_Half);
if (msg.getProperty("__STARTDELIVERTIME") != null || msg.getProperty(MessageConst.PROPERTY_DELAY_TIME_LEVEL) != null) {
context.setMsgType(MessageType.Delay_Msg);
代码示例来源: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: apache/rocketmq
msg.putUserProperty("__transactionId__", sendResult.getTransactionId());
String transactionId = msg.getProperty(MessageConst.PROPERTY_UNIQ_CLIENT_MESSAGE_ID_KEYIDX);
if (null != transactionId && !"".equals(transactionId)) {
msg.setTransactionId(transactionId);
内容来源于网络,如有侵权,请联系作者删除!