Skip to content
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

当对topic进行消息查询后,如果删除该topic,日志会出现大量MQClientException错误 #20

Open
ziyunmuxu opened this issue May 20, 2021 · 3 comments

Comments

@ziyunmuxu
Copy link

场景:当在mqcloud上对某个topic进行消息查询后,此时若删除该topic,会导致在MQClientInstance的定时任务updateTopicRouteInfoFromNameServer出现大量WARNING日志;
原因个人分析,由于使用mqAdmin对象池对topic进行查询时,会将topic信息保存到producerTable中,当删除该topic后,对象池中的producerTable不会同步删除该topic,导致后续定时任务更新topic信息一致报错,不知道上述分析是否正确,有什么解决方式没有?

2021-05-20 18:40:08.065 {MQClientFactoryScheduledThread} WARN RocketmqClient-115 - get Topic [*****_topic] RouteInfoFromNameServer is not exist value
2021-05-20 18:40:08.065 {MQClientFactoryScheduledThread} WARN RocketmqClient-130 - updateTopicRouteInfoFromNameServer Exception
org.apache.rocketmq.client.exception.MQClientException: CODE: 17 DESC: No topic route info in name server for the topic: *****_topic
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

@gaoyf
Copy link
Collaborator

gaoyf commented May 24, 2021

无法重现,请提供完整日志和详细操作步骤,以及mqcloud的版本。

@ziyunmuxu
Copy link
Author

步骤一:申请topic[notify_error_test]
日志:
2021-05-25 10:07:31 INFO http-nio-8080-exec-10 - the topic[notify_error_test] route info changed, old[null] ,new[TopicRouteData [orderTopicConf=null, queueDatas=[QueueData [brokerName=dev-rocketmq-1, readQueueNums=8, writeQueueNums=8, perm=6, topicSynFlag=0]], brokerDatas=[BrokerData [brokerName=dev-rocketmq-1, brokerAddrs={0=...:10911, 1=...:10911}]], filterServerTable={}]]
2021-05-25 10:07:31 INFO http-nio-8080-exec-10 - topicRouteTable.put. Topic = notify_error_test, TopicRouteData[TopicRouteData [orderTopicConf=null, queueDatas=[QueueData [brokerName=dev-rocketmq-1, readQueueNums=8, writeQueueNums=8, perm=6, topicSynFlag=0]], brokerDatas=[BrokerData [brokerName=dev-rocketmq-1, brokerAddrs={0=...:10911, 1=...:10911}]], filterServerTable={}]]

步骤二:生产者任意发送消息,并在页面上点击该Topic,通过生产者返回的msgId查询某条消息
步骤三:关闭生产者,并删除该topic,日志中会一直出现下面告警信息
2021-05-25 10:20:20 WARN MQClientFactoryScheduledThread - get Topic [notify_error_test] RouteInfoFromNameServer is not exist value
2021-05-25 10:20:20 WARN MQClientFactoryScheduledThread - updateTopicRouteInfoFromNameServer Exception
org.apache.rocketmq.client.exception.MQClientException: CODE: 17 DESC: No topic route info in name server for the topic: notify_error_test
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

@gaoyf
Copy link
Collaborator

gaoyf commented May 25, 2021

可以上传mqcloud的stdout.log和rocketmq.log吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants