作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用apache-rocketmq发送消息,但出现异常。我尝试了csdn上的很多解决方案,但不起作用。现在我不知道如何处理它。
这是一个 Linux 服务器,运行 Rocketmq 4.2.0、java 8 和 tomcat 8。
2019-05-06 15:16:01,440 WARN RocketmqClient(256) - doRebalance, eventConsumer, but the topic[alarm_event] not exist.
2019-05-06 15:16:09,230 INFO RocketmqRemoting(454) - createChannel: begin to connect remote host[122.114.164.162:24314] asynchronously
2019-05-06 15:16:09,232 INFO RocketmqRemoting(615) - NETTY CLIENT PIPELINE: CONNECT UNKNOW => /122.114.164.162:24314
2019-05-06 15:16:12,232 WARN RocketmqRemoting(477) - createChannel: connect remote host[122.114.164.162:24314] timeout 3000ms, DefaultChannelPromise@59d7f51c(uncancellable)
2019-05-06 15:16:12,234 INFO RocketmqRemoting(640) - NETTY CLIENT PIPELINE: CLOSE
2019-05-06 15:16:12,234 INFO RocketmqRemoting(286) - closeChannel: the channel[122.114.164.162:24314] was removed from channel table
2019-05-06 15:16:12,234 INFO RocketmqRemoting(640) - NETTY CLIENT PIPELINE: CLOSE
2019-05-06 15:16:12,234 INFO RocketmqRemoting(280) - eventCloseChannel: the channel[null] has been removed from the channel table before
2019-05-06 15:16:12,235 INFO RocketmqRemoting(203) - closeChannel: close the connection to remote address[] result: true
2019-05-06 15:16:21,441 WARN RocketmqClient(256) - doRebalance, eventConsumer, but the topic[alarm_event] not exist.
2019-05-06 15:16:29,558 WARN RocketmqClient(1212) - get Topic [alarm_event] RouteInfoFromNameServer is not exist value
2019-05-06 15:16:29,558 WARN RocketmqClient(658) - updateTopicRouteInfoFromNameServer Exception
org.apache.rocketmq.client.exception.MQClientException: CODE: 17 DESC: No topic route info in name server for the topic: alarm_event
See http://rocketmq.apache.org/docs/faq/ for further details.
at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1227)
at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1197)
at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:605)
at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:492)
at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:361)
at org.apache.rocketmq.client.impl.factory.MQClientInstance$3.run(MQClientInstance.java:278)
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)
最佳答案
您应该运行 RocketMQ-console-ng 应用程序来管理您的主题,然后您可以创建要在程序中使用的主题。RocketMQ-console-ng的地址:https://github.com/apache/rocketmq-externals
关于java - 如何修复RocketmqClient中的 ‘No topic route info in name server for the topic’异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56001097/
我是一名优秀的程序员,十分优秀!