RongtongJin commented on a change in pull request #2169:
URL: https://github.com/apache/rocketmq/pull/2169#discussion_r456289024



##########
File path: 
client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java
##########
@@ -278,11 +278,20 @@ private void rebalanceByTopic(final String topic, final 
boolean isOrder) {
 
                     List<MessageQueue> allocateResult = null;
                     try {
-                        allocateResult = strategy.allocate(
-                            this.consumerGroup,
-                            this.mQClientFactory.getClientId(),
-                            mqAll,
-                            cidAll);
+                        if (!isRebalanceByBroker()) {
+                            allocateResult = strategy.allocate(
+                                this.consumerGroup,
+                                this.mQClientFactory.getClientId(),
+                                mqAll,
+                                cidAll);

Review comment:
       IMO, It would be better that the client only needs to bring the current 
cid to get the result. 
   Both mqAll and cidAll are obtained on the broker side.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to