You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/04/22 01:03:03 UTC

[GitHub] [rocketmq] hzh0425 commented on a diff in pull request #4190: [ISSUE #4164] Remove unnecessary properties from message when messageTimeup

hzh0425 commented on code in PR #4190:
URL: https://github.com/apache/rocketmq/pull/4190#discussion_r855692699


##########
store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java:
##########
@@ -327,14 +326,18 @@ private MessageExtBrokerInner messageTimeup(MessageExt msgExt) {
         msgInner.setReconsumeTimes(msgExt.getReconsumeTimes());
 
         msgInner.setWaitStoreMsgOK(false);
-        MessageAccessor.clearProperty(msgInner, MessageConst.PROPERTY_DELAY_TIME_LEVEL);
 
         msgInner.setTopic(msgInner.getProperty(MessageConst.PROPERTY_REAL_TOPIC));
 
         String queueIdStr = msgInner.getProperty(MessageConst.PROPERTY_REAL_QUEUE_ID);
         int queueId = Integer.parseInt(queueIdStr);
         msgInner.setQueueId(queueId);
 
+        MessageAccessor.clearProperty(msgInner, MessageConst.PROPERTY_DELAY_TIME_LEVEL);
+        MessageAccessor.clearProperty(msgInner, MessageConst.PROPERTY_REAL_TOPIC);
+        MessageAccessor.clearProperty(msgInner, MessageConst.PROPERTY_REAL_QUEUE_ID);
+        MessageAccessor.setProperties(msgInner, msgExt.getProperties());
+

Review Comment:
   It looks like you should clear the properties of msgExt and then set the properties in msgExt to msgInner



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org