ifplusor commented on code in PR #403:
URL:
https://github.com/apache/rocketmq-client-cpp/pull/403#discussion_r903333433
##########
src/protocol/ConsumerRunningInfo.cpp:
##########
@@ -104,16 +104,18 @@ string ConsumerRunningInfo::encode() {
Json::FastWriter fastwrite;
string finals = fastwrite.write(root);
string key = "\"mqTable\":";
- key.append("{");
+ key.append("[");
for (map<MessageQueue, ProcessQueueInfo>::iterator it = mqTable.begin(); it
!= mqTable.end(); ++it) {
+ key.append("[");
key.append((it->first).toJson().toStyledString());
key.erase(key.end() - 1);
- key.append(":");
+ key.append(",");
key.append((it->second).toJson().toStyledString());
+ key.append("]");
key.append(",");
}
key.erase(key.end() - 1);
- key.append("}");
+ key.append("]");
Review Comment:
The type of `mqTable` in Java is `TreeMap<MessageQueue, ProcessQueueInfo>`,
but you marshall it to a list, how does it work?
--
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]