leizhiyuan opened a new issue, #7713:
URL: https://github.com/apache/rocketmq/issues/7713

   ### Before Creating the Bug Report
   
   - [X] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [X] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [X] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   review
   
   ### RocketMQ version
   
   4.9.x
   
   ### JDK Version
   
   _No response_
   
   ### Describe the Bug
   
    MQFaultStrategy will send to wrong broker even when it is not writable
   
   ### Steps to Reproduce
   
    MQFaultStrategy will send to wrong broker even when it is not writable
   
   ### What Did You Expect to See?
   
    MQFaultStrategy will send to wrong broker even when it is not writable
   
   ### What Did You See Instead?
   
    MQFaultStrategy will send to wrong broker even when it is not writable
   
   ### Additional Context
   
   <img width="1013" alt="image" 
src="https://github.com/apache/rocketmq/assets/2684384/4565a392-c7ee-4c92-9648-7c8b5b135c41";>
   
   ```
       public int getQueueIdByBroker(final String brokerName) {
           for (int i = 0; i < topicRouteData.getQueueDatas().size(); i++) {
               final QueueData queueData = 
this.topicRouteData.getQueueDatas().get(i);
               if (queueData.getBrokerName().equals(brokerName)) {
                   return queueData.getWriteQueueNums();
               }
           }
   
           return -1;
       }
   ```
   
   
如果一个topic存在两个broker集群,其中一个broker集群通过perm设置了禁止写入,这里会绕过,并且这里会改变messagequeue,这样,由于外部的topicroute没有变化,这个状态后续无法更新了


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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to