You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "echooymxq (via GitHub)" <gi...@apache.org> on 2023/04/09 15:45:41 UTC
[GitHub] [rocketmq] echooymxq commented on a diff in pull request #6559: [ISSUE #6558]Optimize ReplyMessageProcessor#parseRequestHeader logic and SendMessageRequestHeaderV2
echooymxq commented on code in PR #6559:
URL: https://github.com/apache/rocketmq/pull/6559#discussion_r1161305312
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/SendMessageRequestHeaderV2.java:
##########
@@ -104,217 +104,217 @@ public void checkFields() throws RemotingCommandException {
@Override
public void encode(ByteBuf out) {
- writeIfNotNull(out, "a", a);
- writeIfNotNull(out, "b", b);
- writeIfNotNull(out, "c", c);
- writeIfNotNull(out, "d", d);
- writeIfNotNull(out, "e", e);
- writeIfNotNull(out, "f", f);
- writeIfNotNull(out, "g", g);
- writeIfNotNull(out, "h", h);
- writeIfNotNull(out, "i", i);
- writeIfNotNull(out, "j", j);
- writeIfNotNull(out, "k", k);
- writeIfNotNull(out, "l", l);
- writeIfNotNull(out, "m", m);
- writeIfNotNull(out, "n", n);
+ writeIfNotNull(out, "producerGroup", producerGroup);
+ writeIfNotNull(out, "topic", topic);
+ writeIfNotNull(out, "defaultTopic", defaultTopic);
+ writeIfNotNull(out, "defaultTopicQueueNums", defaultTopicQueueNums);
+ writeIfNotNull(out, "queueId", queueId);
+ writeIfNotNull(out, "sysFlag", sysFlag);
+ writeIfNotNull(out, "bornTimestamp", bornTimestamp);
+ writeIfNotNull(out, "flag", flag);
+ writeIfNotNull(out, "properties", properties);
+ writeIfNotNull(out, "reconsumeTimes", reconsumeTimes);
+ writeIfNotNull(out, "unitMode", unitMode);
+ writeIfNotNull(out, "consumeRetryTimes", consumeRetryTimes);
+ writeIfNotNull(out, "batch", batch);
+ writeIfNotNull(out, "brokerName", brokerName);
}
@Override
public void decode(HashMap<String, String> fields) throws RemotingCommandException {
- String str = getAndCheckNotNull(fields, "a");
+ String str = getAndCheckNotNull(fields, "producerGroup");
if (str != null) {
- a = str;
+ producerGroup = str;
}
- str = getAndCheckNotNull(fields, "b");
+ str = getAndCheckNotNull(fields, "topic");
if (str != null) {
- b = str;
+ topic = str;
}
- str = getAndCheckNotNull(fields, "c");
+ str = getAndCheckNotNull(fields, "defaultTopic");
if (str != null) {
- c = str;
+ defaultTopic = str;
}
- str = getAndCheckNotNull(fields, "d");
+ str = getAndCheckNotNull(fields, "defaultTopicQueueNums");
if (str != null) {
- d = Integer.parseInt(str);
+ defaultTopicQueueNums = Integer.parseInt(str);
}
- str = getAndCheckNotNull(fields, "e");
+ str = getAndCheckNotNull(fields, "queueId");
if (str != null) {
- e = Integer.parseInt(str);
+ queueId = Integer.parseInt(str);
Review Comment:
It will cause compatibility problems for low client version.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org