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 2021/01/09 12:06:43 UTC

[GitHub] [rocketmq] horizonzy opened a new issue #2580: [Enhancement] Check producerTable or consumerTable is empty when updateTopicRouteInfoFromNameServer

horizonzy opened a new issue #2580:
URL: https://github.com/apache/rocketmq/issues/2580


   **FEATURE REQUEST**
   
   1. Please describe the feature you are requesting.
   ```
                               {
                                   TopicPublishInfo publishInfo = topicRouteData2TopicPublishInfo(topic, topicRouteData);
                                   publishInfo.setHaveTopicRouterInfo(true);
                                   Iterator<Entry<String, MQProducerInner>> it = this.producerTable.entrySet().iterator();
                                   while (it.hasNext()) {
                                       Entry<String, MQProducerInner> entry = it.next();
                                       MQProducerInner impl = entry.getValue();
                                       if (impl != null) {
                                           impl.updateTopicPublishInfo(topic, publishInfo);
                                       }
                                   }
                               }
   
                               // Update sub info
                               {
                                   Set<MessageQueue> subscribeInfo = topicRouteData2TopicSubscribeInfo(topic, topicRouteData);
                                   Iterator<Entry<String, MQConsumerInner>> it = this.consumerTable.entrySet().iterator();
                                   while (it.hasNext()) {
                                       Entry<String, MQConsumerInner> entry = it.next();
                                       MQConsumerInner impl = entry.getValue();
                                       if (impl != null) {
                                           impl.updateTopicSubscribeInfo(topic, subscribeInfo);
                                       }
                                   }
                               }
   ```
   Now whatever producerTable or consumerTable is empty, it will transfer topicRouteData to publishInfo and subscribeInfo.
   In fact, if producerTable is empty, it's unnecessary to transfer topicRouteData to publishInfo, if consumerTable is empty, 
   it's unnecessary to transfer topicRouteData to subscribeInfo.


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



[GitHub] [rocketmq] duhenglucky closed issue #2580: [Enhancement] Check producerTable or consumerTable is empty when updateTopicRouteInfoFromNameServer

Posted by GitBox <gi...@apache.org>.
duhenglucky closed issue #2580:
URL: https://github.com/apache/rocketmq/issues/2580


   


-- 
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: dev-unsubscribe@rocketmq.apache.org

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