You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug] After a producer sends a message and deletes the Topic, the Topic remains in the producer's topicPublishInfoTable, continuously triggering warning logs during topic route updates
#8025
Open
3 tasks done
HScarb opened this issue
Apr 16, 2024
· 0 comments
· May be fixed by #8027
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
create a topic called TopicTest
create a producer and send a message on this topic
delete topic TopicTest
keep the process and the producer running
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
2024-04-16 15:16:41.784 WARN [157104] [MQClientFactoryScheduledThread] [o.a.r.c.i.MQClientAPIImpl#?:?] - get Topic [TopicTest] RouteInfoFromNameServer is not exist value
2024-04-16 15:16:41.784 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
See https://rocketmq.apache.org/docs/bestPractice/06FAQ for further details.
at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:2024)
at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1995)
at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:781)
at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:573)
at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:410)
at org.apache.rocketmq.client.impl.factory.MQClientInstance.lambda$startScheduledTask$3(MQClientInstance.java:344)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
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
See https://rocketmq.apache.org/docs/bestPractice/06FAQ for further details.
at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:2024)
at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1995)
at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:781)
at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:573)
at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:410)
at org.apache.rocketmq.client.impl.factory.MQClientInstance.lambda$startScheduledTask$3(MQClientInstance.java:344)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
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.
Before Creating the Bug Report
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
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
TopicTest
TopicTest
What Did You Expect to See?
no warning log, and
TopicTest
was removed fromtopicPublishInfoTable
in the producerWhat Did You See Instead?
warning log
and
TopicTest
still intopicPublishInfoTable
in the producerAdditional 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.
rocketmq/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java
Lines 765 to 839 in ac5545c
rocketmq/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
Lines 1998 to 2025 in ac5545c
The text was updated successfully, but these errors were encountered: