sinrimin commented on code in PR #391:
URL: https://github.com/apache/rocketmq-connect/pull/391#discussion_r1046689385


##########
rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/connectorwrapper/WorkerSinkTask.java:
##########
@@ -558,8 +558,11 @@ private ConnectRecord convertMessages(MessageExt message) {
         }
 
         // add extension
-        addExtension(properties, record);
-        return record;
+        addExtension(properties, transformedRecord);
+
+        // add msgId to extension
+        transformedRecord.addExtension("MQ-SYS-MSG_ID", message.getMsgId());

Review Comment:
   msgId is useful in some cases, such as outputting logs. Because message key 
is optional. It can be placed in the addExtension method, but the method 
signature needs to be modified to add the message parameter. I can modify it if 
necessary.



-- 
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