[
https://issues.apache.org/jira/browse/ROCKETMQ-204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16043850#comment-16043850
]
ASF GitHub Bot commented on ROCKETMQ-204:
-----------------------------------------
Github user Jaskey commented on a diff in the pull request:
https://github.com/apache/incubator-rocketmq/pull/115#discussion_r121039751
--- Diff:
client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java
---
@@ -621,34 +621,23 @@ public boolean
updateTopicRouteInfoFromNameServer(final String topic, boolean is
{
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);
- }
- }
+ updatePubInfoTable(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);
- }
- }
+ updateSubInfoTable(topic, subscribeInfo);
}
log.info("topicRouteTable.put. Topic = {},
TopicRouteData[{}]", topic, cloneTopicRouteData);
this.topicRouteTable.put(topic,
cloneTopicRouteData);
return true;
}
} else {
- log.warn("updateTopicRouteInfoFromNameServer,
getTopicRouteInfoFromNameServer return null, Topic: {}", topic);
+ log.warn("updateTopicRouteInfoFromNameServer,
getTopicRouteInfoFromNameServer return null. Topic: {}", topic);
--- End diff --
It seems you are right, this design is confusing , maybe we change the
logic into returns null?
> when all brokers is offline, client still attempts to send heartbeat
> --------------------------------------------------------------------
>
> Key: ROCKETMQ-204
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-204
> Project: Apache RocketMQ
> Issue Type: Bug
> Components: rocketmq-broker, rocketmq-client
> Reporter: Eason Chen
> Assignee: Jaskey Lam
>
> all brokers were down but client still hold at least one broker adresss and
> report heartbeat to it.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)