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:
[email protected]