yuz10 commented on a change in pull request #3588:
URL: https://github.com/apache/rocketmq/pull/3588#discussion_r776595912



##########
File path: 
common/src/main/java/org/apache/rocketmq/common/protocol/header/SendMessageResponseHeader.java
##########
@@ -37,6 +42,37 @@
     public void checkFields() throws RemotingCommandException {
     }
 
+    @Override
+    public void encode(ByteBuf out) {
+        writeIfNotNull(out, "msgId", msgId);
+        writeIfNotNull(out, "queueId", queueId);
+        writeIfNotNull(out, "queueOffset", queueOffset);
+        writeIfNotNull(out, "transactionId", transactionId);
+    }
+
+    @Override
+    public void decode(HashMap<String, String> fields) throws 
RemotingCommandException {
+        String str = getAndCheckNotNull(fields, "msgId");

Review comment:
       It would be better to add a test to compare the old decode result and 
fast decode result in case we add a new field later.




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