mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-19 02:23:24 +08:00
* fix NullPointerException when message escape to remote * fix NumberFormatException when message retry to escape to remote * fix timerCheckPoint of the master is not updated, causing the timer message to be replayed after master is restarted * Use properties copies instead of referencing the same map when converting message
This commit is contained in:
@@ -602,6 +602,10 @@ public class TimerMessageStore {
|
||||
this.shouldRunningDequeue = shouldRunningDequeue;
|
||||
}
|
||||
|
||||
public boolean isShouldRunningDequeue() {
|
||||
return shouldRunningDequeue;
|
||||
}
|
||||
|
||||
public void addMetric(MessageExt msg, int value) {
|
||||
try {
|
||||
if (null == msg || null == msg.getProperty(MessageConst.PROPERTY_REAL_TOPIC)) {
|
||||
@@ -1084,8 +1088,10 @@ public class TimerMessageStore {
|
||||
case PUT_OK:
|
||||
if (brokerStatsManager != null) {
|
||||
this.brokerStatsManager.incTopicPutNums(message.getTopic(), 1, 1);
|
||||
this.brokerStatsManager.incTopicPutSize(message.getTopic(),
|
||||
putMessageResult.getAppendMessageResult().getWroteBytes());
|
||||
if (putMessageResult.getAppendMessageResult() != null) {
|
||||
this.brokerStatsManager.incTopicPutSize(message.getTopic(),
|
||||
putMessageResult.getAppendMessageResult().getWroteBytes());
|
||||
}
|
||||
this.brokerStatsManager.incBrokerPutNums(message.getTopic(), 1);
|
||||
}
|
||||
return PUT_OK;
|
||||
@@ -1119,7 +1125,7 @@ public class TimerMessageStore {
|
||||
MessageExtBrokerInner msgInner = new MessageExtBrokerInner();
|
||||
msgInner.setBody(msgExt.getBody());
|
||||
msgInner.setFlag(msgExt.getFlag());
|
||||
MessageAccessor.setProperties(msgInner, msgExt.getProperties());
|
||||
MessageAccessor.setProperties(msgInner, MessageAccessor.deepCopyProperties(msgExt.getProperties()));
|
||||
TopicFilterType topicFilterType = MessageExt.parseTopicFilterType(msgInner.getSysFlag());
|
||||
long tagsCodeValue =
|
||||
MessageExtBrokerInner.tagsString2tagsCode(topicFilterType, msgInner.getTags());
|
||||
|
||||
Reference in New Issue
Block a user