alaric27 commented on code in PR #4218:
URL: https://github.com/apache/rocketmq/pull/4218#discussion_r859456984


##########
broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java:
##########
@@ -246,12 +246,6 @@ private RemotingCommand processRequest(final Channel 
channel, RemotingCommand re
             responseHeader.setMinOffset(getMessageResult.getMinOffset());
             responseHeader.setMaxOffset(getMessageResult.getMaxOffset());
 
-            if (getMessageResult.isSuggestPullingFromSlave()) {

Review Comment:
   I think the following code covers this logic
   ```java
               if (this.brokerController.getBrokerConfig().isSlaveReadEnable()) 
{
                   // consume too slow ,redirect to another machine
                   if (getMessageResult.isSuggestPullingFromSlave()) {
                       
responseHeader.setSuggestWhichBrokerId(subscriptionGroupConfig.getWhichBrokerWhenConsumeSlowly());
                   }
                   // consume ok
                   else {
                       
responseHeader.setSuggestWhichBrokerId(subscriptionGroupConfig.getBrokerId());
                   }
               } else {
                   responseHeader.setSuggestWhichBrokerId(MixAll.MASTER_ID);
               }
   ```



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