MountainOne commented on issue #1576: Bug in select MessageQueue
URL: https://github.com/apache/rocketmq/issues/1576#issuecomment-557037645
 
 
   @duhenglucky 
   >On the one hand, RocketMQ will replace the target MQ to avoid load 
imbalance. On the other hand, once the latencyFaultTolerance.isAvailable() 
method returns true, it means the current broker is not isolated.
   
   I totally agree with you. When `latencyFaultTolerance.isAvailable()` returns 
true, the current broker is available. But the problem is the following jugment 
`if (null == lastBrokerName || mq.getBrokerName().equals(lastBrokerName))`. 
When `lastBrokerName` is not null, it indicates that some exception has occured 
and program entered the retry logic. 
   **The broker corresponding to lastBrokerName is already unavailable.** So 
`mq.getBrokerName().equals(lastBrokerName)` will definitely return false, 
result in no MQ will be chosen. Program Will automatically enter the following 
logic to randomly select the broker, MQFaultStrategy is not working.

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


With regards,
Apache Git Services

Reply via email to