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/07/26 03:18:51 UTC

[GitHub] [rocketmq] Pirate-Captain opened a new issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Pirate-Captain opened a new issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179


   The issue tracker is **ONLY** used for bug report(feature request need to follow [RIP process](https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal)). Keep in mind, please check whether there is an existing same report before your raise a new one.
   
   Alternately (especially if your communication is not a bug report), you can send mail to our [mailing lists](http://rocketmq.apache.org/about/contact/). We welcome any friendly suggestions, bug fixes, collaboration and other improvements.
   
   Please ensure that your bug report is clear and that it is complete. Otherwise, we may be unable to understand it or to reproduce it, either of which would prevent us from fixing the bug. We strongly recommend the report(bug report or feature request) could include some hints as the following:
   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   - What did you do (The steps to reproduce)?
   
   - What did you expect to see?
   
   - What did you see instead?
   
   2. Please tell us about your environment:
   
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
   
   **FEATURE REQUEST**
   
   1. Please describe the feature you are requesting.
   
   2. Provide any additional detail on your proposed use case for this feature.
   
   2. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?
   
   4. If there are some sub-tasks using -[] for each subtask and create a corresponding issue to map to the sub task:
   
   - [sub-task1-issue-number](example_sub_issue1_link_here): sub-task1 description here, 
   - [sub-task2-issue-number](example_sub_issue2_link_here): sub-task2 description here,
   - ...
   when the autoCreateTopicEnable  set false ,so there is no TBW102 topic in the nameserver, start a consumer, there is a warn log info:
   org.apache.rocketmq.logging.Slf4jLoggerFactory$Slf4jLogger.warn(Slf4jLoggerFactory.java:130) updateTopicRouteInfoFromNameServer Exception
   org.apache.rocketmq.client.exception.MQClientException: CODE: 17  DESC: No topic route info in name server for the topic: TBW102
   See http://rocketmq.apache.org/docs/faq/ for further details.
   	at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1385)
   	at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1355)
   	at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:622)
   	at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:509)
   	at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:358)
   	at org.apache.rocketmq.client.impl.factory.MQClientInstance$3.run(MQClientInstance.java:275)
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
   	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
   	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   	at java.lang.Thread.run(Thread.java:748)


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



[GitHub] [rocketmq] guyinyou commented on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
guyinyou commented on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-887327648


   1、The exception will be caught normally so it will not affect the process.
   2、And the exception information is only considered a false alarm when all brokers have set autoCreateTopicEnable to false.
   Based on the above two points, the cost of fixing this problem is higher than the benefit.
   Don't know if you have any good suggestions.... Orz


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



[GitHub] [rocketmq] guyinyou commented on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
guyinyou commented on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-888833179


   Suggestion 2 changed the message sending logic, which is more intrusive and not recommended. (The original logic is that the producer judges whether it can be sent)
   
   Suggestion 1 is very clever, I approve it. You can submit a pull request and do follow-up testing.


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



[GitHub] [rocketmq] xdshent commented on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
xdshent commented on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-886538821


   What is the code on the consumer side?


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



[GitHub] [rocketmq] ltamber commented on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
ltamber commented on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-886498776


   Is topic `TBW102` created before ?


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



[GitHub] [rocketmq] ltamber removed a comment on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
ltamber removed a comment on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-886498776


   whether topic `TBW102` created before ?


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



[GitHub] [rocketmq] Pirate-Captain edited a comment on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
Pirate-Captain edited a comment on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-887164930


   The version is 4.9.0.
   First of all, If set the autoCreateTopicEnable = false,when start the broker, the broker won't register the topic "TBW102" to the nameserver(See the constructor of TopicConfigManager, the line 70)
   ```
   if (this.brokerController.getBrokerConfig().isAutoCreateTopicEnable()) {
                   String topic = TopicValidator.AUTO_CREATE_TOPIC_KEY_TOPIC;
                   TopicConfig topicConfig = new TopicConfig(topic);
                   TopicValidator.addSystemTopic(topic);
                   topicConfig.setReadQueueNums(this.brokerController.getBrokerConfig()
                       .getDefaultTopicQueueNums());
                   topicConfig.setWriteQueueNums(this.brokerController.getBrokerConfig()
                       .getDefaultTopicQueueNums());
                   int perm = PermName.PERM_INHERIT | PermName.PERM_READ | PermName.PERM_WRITE;
                   topicConfig.setPerm(perm);
                   this.topicConfigTable.put(topicConfig.getTopicName(), topicConfig);
               }
   ```
   Second, when start a consumer, it will create a DefaultMQProducer in the MQClintInstance, and will register the producer into the producerTable(MQClientInstance.start line 244), and register the TBW102 to the DefaultMQProducerImpl's topicPublishInfoTable(DefaultMQProducerImpl line 207)
   the entry code is:
   ```
   this.defaultMQProducer.getDefaultMQProducerImpl().start(false);
   ```
   and the register code is (DefaultMQProducerImpl.start() line 199  line 207):
   ```
    boolean registerOK = mQClientFactory.registerProducer(this.defaultMQProducer.getProducerGroup(), this);
                   if (!registerOK) {
                       this.serviceState = ServiceState.CREATE_JUST;
                       throw new MQClientException("The producer group[" + this.defaultMQProducer.getProducerGroup()
                           + "] has been created before, specify another name please." + FAQUrl.suggestTodo(FAQUrl.GROUP_NAME_DUPLICATE_URL),
                           null);
                   }
   
                   this.topicPublishInfoTable.put(this.defaultMQProducer.getCreateTopicKey(), new TopicPublishInfo());
   ```
   
   So, when the MQClientInstance scheduled executes the method updateTopicRouteInfoFromNameServer, it will put the 'TBW102' topic to the topicList, see MQClientInstance.updateTopicRouteInfoFromNameServer line 347
   ```
   // Producer
           {
               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) {
                       Set<String> lst = impl.getPublishTopicList();
                       topicList.addAll(lst);
                   }
               }
           }
   ```
   the code above will put the topic of  TBW102  to the topicList, the next code update every topic in the topic list.
   
   I don't know whether do i describe clearly.


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



[GitHub] [rocketmq] lizhiboo commented on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
lizhiboo commented on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-886694404


   which branch do u use? isDefault is false in develop branch as following
   ```java
   508    public boolean updateTopicRouteInfoFromNameServer(final String topic) {
   509       return updateTopicRouteInfoFromNameServer(topic, false, null);
       }
   ```


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



[GitHub] [rocketmq] Pirate-Captain commented on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
Pirate-Captain commented on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-887167310


   > What is the code on the consumer side?
   
   I have described the detail info above.


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



[GitHub] [rocketmq] Pirate-Captain commented on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
Pirate-Captain commented on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-888059373


   @lizhiboo @guyinyou 
   As all of the brokers set the autoCreateTopicEnable false, So I just change the method "updateTopicRouteInfoFromNameServer" as follow(MQClientInstance line 358), instead of changing the log level of 'RocketmqClient' to 'ERROR':
   ```java
           for ( String topic : topicList ) {
               if ( StringUtils.equals(topic, TopicValidator.AUTO_CREATE_TOPIC_KEY_TOPIC) ) {
                   continue;
               }
               this.updateTopicRouteInfoFromNameServer(topic);
           }
   ```
   In my opinion, it is no necessary to update the TBW102 topic route info here. If the autoCreateTopicEnable set true, when send message, if the topic is not exist, it will update TBW102 topic route info first(DefaultMQProducerImpl.sendDefaultImpl() line 566).


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



[GitHub] [rocketmq] Pirate-Captain commented on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
Pirate-Captain commented on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-887167509


   > which branch do u use? isDefault is false in develop branch as following
   > 
   > ```java
   > 508    public boolean updateTopicRouteInfoFromNameServer(final String topic) {
   > 509       return updateTopicRouteInfoFromNameServer(topic, false, null);
   >     }
   > ```
   
   I have describe the detail info above


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



[GitHub] [rocketmq] Pirate-Captain commented on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
Pirate-Captain commented on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-887164930


   The version is 4.9.0.
   First of all, If set the autoCreateTopicEnable = false,when start the broker, the broker won't register the topic "TBW102" to the nameserver(See the constructor of TopicConfigManager, the line 70)
   `if (this.brokerController.getBrokerConfig().isAutoCreateTopicEnable()) {
                   String topic = TopicValidator.AUTO_CREATE_TOPIC_KEY_TOPIC;
                   TopicConfig topicConfig = new TopicConfig(topic);
                   TopicValidator.addSystemTopic(topic);
                   topicConfig.setReadQueueNums(this.brokerController.getBrokerConfig()
                       .getDefaultTopicQueueNums());
                   topicConfig.setWriteQueueNums(this.brokerController.getBrokerConfig()
                       .getDefaultTopicQueueNums());
                   int perm = PermName.PERM_INHERIT | PermName.PERM_READ | PermName.PERM_WRITE;
                   topicConfig.setPerm(perm);
                   this.topicConfigTable.put(topicConfig.getTopicName(), topicConfig);
               }`
   Second, when start a consumer, it will create a DefaultMQProducer in the MQClintInstance, and will register the producer into the producerTable(MQClientInstance.start line 244), and register the TBW102 to the DefaultMQProducerImpl's topicPublishInfoTable(DefaultMQProducerImpl line 207)
   the entry code is:
   `this.defaultMQProducer.getDefaultMQProducerImpl().start(false);`
   and the register code is (DefaultMQProducerImpl.start() line 199  line 207):
   ` boolean registerOK = mQClientFactory.registerProducer(this.defaultMQProducer.getProducerGroup(), this);
                   if (!registerOK) {
                       this.serviceState = ServiceState.CREATE_JUST;
                       throw new MQClientException("The producer group[" + this.defaultMQProducer.getProducerGroup()
                           + "] has been created before, specify another name please." + FAQUrl.suggestTodo(FAQUrl.GROUP_NAME_DUPLICATE_URL),
                           null);
                   }
   
                   this.topicPublishInfoTable.put(this.defaultMQProducer.getCreateTopicKey(), new TopicPublishInfo());`
   
   So, when the MQClientInstance scheduled executes the method updateTopicRouteInfoFromNameServer, it will put the 'TBW102' topic to the topicList, see MQClientInstance.updateTopicRouteInfoFromNameServer line 347
   ` // Producer
           {
               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) {
                       Set<String> lst = impl.getPublishTopicList();
                       topicList.addAll(lst);
                   }
               }
           }`
   the code above will put the topic of  TBW102  to the topicList, the next code update every topic in the topic list.
   
   I don't know whether do i describe clearly.


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



[GitHub] [rocketmq] Pirate-Captain edited a comment on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
Pirate-Captain edited a comment on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-888058959


   @lizhiboo @guyinyou 
   As all of the brokers set the autoCreateTopicEnable false, So I just change the method "updateTopicRouteInfoFromNameServer" as follow(MQClientInstance line 358), instead of changing the log level of 'RocketmqClient' to 'ERROR':
   ```java
           for ( String topic : topicList ) {
               if ( StringUtils.equals(topic, TopicValidator.AUTO_CREATE_TOPIC_KEY_TOPIC) ) {
                   continue;
               }
               this.updateTopicRouteInfoFromNameServer(topic);
           }
   ```
   Suggestion 1:
   In my opinion, it is no necessary to update the TBW102 topic route info here. If the autoCreateTopicEnable set true, when send message, if the topic is not exist, it will update TBW102 topic route info first(DefaultMQProducerImpl.sendDefaultImpl() line 566).
   
   Suggestion 2(I haven't tested this method ):
   Change the constructor of TopicConfigManager, Just put the TBW102 to the topicConfigTable, then when broker start, it will regist the TBW102 to the nameserver.
   If the autoCreateTopicEnable set false, if the topic is not exist, when the message send to the broker, it will invoke the method of TopicConfigManager.createTopicInSendMessageMethod, this method will check if the defaultTopic is TBW102 and the autoCreateTopicEnable is true(TopicConfigManager line 170), if the autoCreateTopicEnable is false, it will return null topicConfig. It won't auto create topic either.  I just read the code, and never try this method.


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



[GitHub] [rocketmq] ltamber edited a comment on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
ltamber edited a comment on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-886498776


   whether topic `TBW102` created before ?


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



[GitHub] [rocketmq] lizhiboo commented on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
lizhiboo commented on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-887241232


   > The version is 4.9.0.
   > First of all, If set the autoCreateTopicEnable = false,when start the broker, the broker won't register the topic "TBW102" to the nameserver(See the constructor of TopicConfigManager, the line 70)
   > 
   > ```
   > if (this.brokerController.getBrokerConfig().isAutoCreateTopicEnable()) {
   >                 String topic = TopicValidator.AUTO_CREATE_TOPIC_KEY_TOPIC;
   >                 TopicConfig topicConfig = new TopicConfig(topic);
   >                 TopicValidator.addSystemTopic(topic);
   >                 topicConfig.setReadQueueNums(this.brokerController.getBrokerConfig()
   >                     .getDefaultTopicQueueNums());
   >                 topicConfig.setWriteQueueNums(this.brokerController.getBrokerConfig()
   >                     .getDefaultTopicQueueNums());
   >                 int perm = PermName.PERM_INHERIT | PermName.PERM_READ | PermName.PERM_WRITE;
   >                 topicConfig.setPerm(perm);
   >                 this.topicConfigTable.put(topicConfig.getTopicName(), topicConfig);
   >             }
   > ```
   > 
   > Second, when start a consumer, it will create a DefaultMQProducer in the MQClintInstance, and will register the producer into the producerTable(MQClientInstance.start line 244), and register the TBW102 to the DefaultMQProducerImpl's topicPublishInfoTable(DefaultMQProducerImpl line 207)
   > the entry code is:
   > 
   > ```
   > this.defaultMQProducer.getDefaultMQProducerImpl().start(false);
   > ```
   > 
   > and the register code is (DefaultMQProducerImpl.start() line 199 line 207):
   > 
   > ```
   >  boolean registerOK = mQClientFactory.registerProducer(this.defaultMQProducer.getProducerGroup(), this);
   >                 if (!registerOK) {
   >                     this.serviceState = ServiceState.CREATE_JUST;
   >                     throw new MQClientException("The producer group[" + this.defaultMQProducer.getProducerGroup()
   >                         + "] has been created before, specify another name please." + FAQUrl.suggestTodo(FAQUrl.GROUP_NAME_DUPLICATE_URL),
   >                         null);
   >                 }
   > 
   >                 this.topicPublishInfoTable.put(this.defaultMQProducer.getCreateTopicKey(), new TopicPublishInfo());
   > ```
   > 
   > So, when the MQClientInstance scheduled executes the method updateTopicRouteInfoFromNameServer, it will put the 'TBW102' topic to the topicList, see MQClientInstance.updateTopicRouteInfoFromNameServer line 347
   > 
   > ```
   > // Producer
   >         {
   >             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) {
   >                     Set<String> lst = impl.getPublishTopicList();
   >                     topicList.addAll(lst);
   >                 }
   >             }
   >         }
   > ```
   > 
   > the code above will put the topic of TBW102 to the topicList, the next code update every topic in the topic list.
   > 
   > I don't know whether do i describe clearly.
   
   I got it,  start DefaultMQProducerImpl will put TBW102 to topicPublishTable indeed. Do u have any suggestion to fix this problem friendly?


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



[GitHub] [rocketmq] Pirate-Captain commented on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
Pirate-Captain commented on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-888058959


   @lizhiboo @guyinyou 
   As all of the brokers set the autoCreateTopicEnable false, So I just change the method "updateTopicRouteInfoFromNameServer" as follow(MQClientInstance line 358), instead of changing the log level of 'RocketmqClient' to 'ERROR':
   ```java
           for ( String topic : topicList ) {
               if ( StringUtils.equals(topic, TopicValidator.AUTO_CREATE_TOPIC_KEY_TOPIC) ) {
                   continue;
               }
               this.updateTopicRouteInfoFromNameServer(topic);
           }
   ```
   In my opinion, it is no necessary to update the TBW102 topic route info here. If the autoCreateTopicEnable set true, when send message, if the topic is not exist, it will update TBW102 topic route info first(DefaultMQProducerImpl.sendDefaultImpl() line 566).


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



[GitHub] [rocketmq] Pirate-Captain removed a comment on issue #3179: autoCreateTopicEnable set false, No topic route info in name server for the topic: TBW102

Posted by GitBox <gi...@apache.org>.
Pirate-Captain removed a comment on issue #3179:
URL: https://github.com/apache/rocketmq/issues/3179#issuecomment-888059373


   @lizhiboo @guyinyou 
   As all of the brokers set the autoCreateTopicEnable false, So I just change the method "updateTopicRouteInfoFromNameServer" as follow(MQClientInstance line 358), instead of changing the log level of 'RocketmqClient' to 'ERROR':
   ```java
           for ( String topic : topicList ) {
               if ( StringUtils.equals(topic, TopicValidator.AUTO_CREATE_TOPIC_KEY_TOPIC) ) {
                   continue;
               }
               this.updateTopicRouteInfoFromNameServer(topic);
           }
   ```
   In my opinion, it is no necessary to update the TBW102 topic route info here. If the autoCreateTopicEnable set true, when send message, if the topic is not exist, it will update TBW102 topic route info first(DefaultMQProducerImpl.sendDefaultImpl() line 566).


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