HScarb opened a new issue, #8025:
URL: https://github.com/apache/rocketmq/issues/8025

   ### Before Creating the Bug Report
   
   - [X] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [X] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [X] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   Windows 11
   
   ### RocketMQ version
   
   newest develop branch
   
   ### JDK Version
   
   JDK8
   
   ### Describe the Bug
   
   After a producer sends a message to a Topic and then deletes that Topic, the 
Topic will not be removed from the producer's topicPublishInfoTable. Each time 
the Topic routing information is updated, warning logs will continue to be 
printed.
   
   ### Steps to Reproduce
   
   1. create a topic called `TopicTest`
   2. create a producer and send a message on this topic
   3. delete topic `TopicTest`
   4. keep the process and the producer running
   5. retrieve rocketmqclient.log file
   
   ### What Did You Expect to See?
   
   no warning log, and `TopicTest` was removed from `topicPublishInfoTable` in 
the producer
   
   ### What Did You See Instead?
   
   warning log
   ```log
   2024-04-16 15:17:11.768 WARN  [157104] [MQClientFactoryScheduledThread] 
[o.a.r.c.i.MQClientAPIImpl#?:?] - get Topic [TopicTest] RouteInfoFromNameServer 
is not exist value
   2024-04-16 15:17:11.768 WARN  [157104] [MQClientFactoryScheduledThread] 
[o.a.r.c.i.f.MQClientInstance#?:?] - updateTopicRouteInfoFromNameServer 
Exception
   org.apache.rocketmq.client.exception.MQClientException: CODE: 17  DESC: No 
topic route info in name server for the topic: TopicTest
   ```
   
   and `TopicTest` still in `topicPublishInfoTable` in the producer
   
   ### Additional Context
   
   The reason is
   After the producer sends messages to a topic, the topic will be saved info 
`topicPublishInfoTable` in the producer.
   When updating the topic route from nameserver, the client instance will find 
the topic does not exist and throw an exception.
   
   
https://github.com/apache/rocketmq/blob/ac5545cca47d4075c1f4e6f9bbdcbe9b34da5465/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java#L765-L839
   
   
https://github.com/apache/rocketmq/blob/ac5545cca47d4075c1f4e6f9bbdcbe9b34da5465/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java#L1998-L2025


-- 
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: commits-unsubscr...@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to