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


##########
store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java:
##########
@@ -327,14 +325,19 @@ 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));
+        
msgInner.setTopic(msgExt.getProperty(MessageConst.PROPERTY_REAL_TOPIC));
 
-        String queueIdStr = 
msgInner.getProperty(MessageConst.PROPERTY_REAL_QUEUE_ID);
+        String queueIdStr = 
msgExt.getProperty(MessageConst.PROPERTY_REAL_QUEUE_ID);
         int queueId = Integer.parseInt(queueIdStr);
         msgInner.setQueueId(queueId);
 
+        MessageAccessor.clearProperty(msgExt, 
MessageConst.PROPERTY_DELAY_TIME_LEVEL);

Review Comment:
   As a good programming practice, I don't think the contents of the method 
argument msgExt should change.
   Here's my advice:
   MessageAccessor.setProperties(msgInner, msgExt.getProperties());
   MessageAccessor.clearProperty(msgInner, MessageConst.PROPERTY_REAL_TOPIC);
   .......
   
msgInner.setPropertiesString(MessageDecoder.messageProperties2String(msgInner.getProperties()));



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to