You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/11/14 08:13:39 UTC

[GitHub] [rocketmq] MountainOne opened a new issue #1594: Naming ambiguity in TopicPublishInfo#getQueueIdByBroker

MountainOne opened a new issue #1594: Naming ambiguity in TopicPublishInfo#getQueueIdByBroker
URL: https://github.com/apache/rocketmq/issues/1594
 
 
   From the naming point of view, `getQueueIdByBroker`  should return its corresponding `queueId` based on the input broker name. But the method actually returns the corresponding `writeQueueNums` of the broker, resulting in naming ambiguity.
   ```
   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;
       }
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services