dongeforever commented on code in PR #4772:
URL: https://github.com/apache/rocketmq/pull/4772#discussion_r990619581
##########
client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:
##########
@@ -738,19 +768,22 @@ private SendResult sendDefaultImpl(
private TopicPublishInfo tryToFindTopicPublishInfo(final String topic) {
TopicPublishInfo topicPublishInfo =
this.topicPublishInfoTable.get(topic);
+
+ // topic route info not in local cache, then make a request to
nameServer
if (null == topicPublishInfo || !topicPublishInfo.ok()) {
this.topicPublishInfoTable.putIfAbsent(topic, new
TopicPublishInfo());
Review Comment:
If the topicPublishInfo is not ok(i.e. the topic does not exist), it will
generate RPC for each message, which will cause too many requests to the
nameserver, and make the nameserver to be hot.
For the failed topic, we may need to add a placeholder for it.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]