guyinyou commented on code in PR #7665: URL: https://github.com/apache/rocketmq/pull/7665#discussion_r1427551399
########## broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java: ########## @@ -493,8 +509,22 @@ private CompletableFuture<Long> popMsgFromQueue(String attemptId, boolean isRetr PopMessageRequestHeader requestHeader, int queueId, long restNum, int reviveQid, Channel channel, long popTime, ExpressionMessageFilter messageFilter, StringBuilder startOffsetInfo, StringBuilder msgOffsetInfo, StringBuilder orderCountInfo) { - String topic = isRetry ? KeyBuilder.buildPopRetryTopic(requestHeader.getTopic(), - requestHeader.getConsumerGroup()) : requestHeader.getTopic(); + return popMsgFromQueue(attemptId, isRetry, getMessageResult, requestHeader, queueId, restNum, reviveQid, channel, + popTime, messageFilter, startOffsetInfo, msgOffsetInfo, orderCountInfo, true); + } + + private CompletableFuture<Long> popMsgFromQueue(String attemptId, boolean isRetry, GetMessageResult getMessageResult, + PopMessageRequestHeader requestHeader, int queueId, long restNum, int reviveQid, + Channel channel, long popTime, ExpressionMessageFilter messageFilter, StringBuilder startOffsetInfo, + StringBuilder msgOffsetInfo, StringBuilder orderCountInfo, boolean isRetryV2) { + String topic; Review Comment: 在调用 popMsgFromQueue 之前应该都有一段 this.brokerController.getTopicConfigManager().selectTopicConfig() 的逻辑,其实已经确定好topic名字了,如果直接传进来,是不是就不需要关心v1还是v2了,逻辑更收敛,而且少了一次字符串拼接性能也好一点。 -- 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-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org