-
Notifications
You must be signed in to change notification settings - Fork 12k
[ROCKETMQ-204]-when all brokers is offline, client still attempts to send heartbeat #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ROCKETMQ-204]-when all brokers is offline, client still attempts to send heartbeat #115
Conversation
1 similar comment
2 similar comments
| } | ||
| } else { | ||
| Set<MessageQueue> prev = this.rebalanceImpl.getTopicSubscribeInfoTable().remove(topic); | ||
| log.info("instanceName={}, group={}, topicSubscribeInfoTable of topic {} is remove, {}, prev = {}", defaultMQPullConsumer.getInstanceName(), defaultMQPullConsumer.getConsumerGroup(), topic, prev); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is remove --> is removed
| } | ||
| } else { | ||
| log.warn("updateTopicRouteInfoFromNameServer, getTopicRouteInfoFromNameServer return null, Topic: {}", topic); | ||
| log.warn("updateTopicRouteInfoFromNameServer, getTopicRouteInfoFromNameServer return null. Topic: {}", topic); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, API(getTopicRouteInfoFromNameServer) will throw exception when not found topic route, so the logic will never enter 'else', am I right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you are right, this design is confusing , maybe we change the logic into returns null, Or I just catch the MQClientException for the same logic
I will suggest
- return null
- throw a prefine exception
which is closer to the presentative judgment .
|
@vsair @lizhanhui please review the updated pr |
|
@Jaskey I'll check it today. |
|
any opinions? |
|
@Jaskey I will close the pr, if you happened to the same question, please let me know. |
JIRA: https://issues.apache.org/jira/browse/ROCKETMQ-204?jql=project%20%3D%20ROCKETMQ