运行报错

来源:9-9 Spring消息编程模型01-编写生产者

Fernwehs

2020-02-26

2020-02-26 15:18:23.191 ERROR 1116 — [nio-8010-exec-1] o.a.r.spring.core.RocketMQTemplate : syncSend failed. destination:add-bonus, message:GenericMessage [payload={“userId”:1,“bonus”:50}, headers={contentType=text/plain, id=7aa94410-7980-845d-7b1d-cf520c6b58a6, timestamp=1582701503183}]
2020-02-26 15:18:23.223 ERROR 1116 — [nio-8010-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.messaging.MessagingException: No route info of this topic, add-bonus
See http://rocketmq.apache.org/docs/faq/ for further details.; nested exception is org.apache.rocketmq.client.exception.MQClientException: No route info of this topic, add-bonus
See http://rocketmq.apache.org/docs/faq/ for further details.] with root cause

org.apache.rocketmq.client.exception.MQClientException: No route info of this topic, add-bonus
See http://rocketmq.apache.org/docs/faq/ for further details.

写回答

2回答

梅村

2020-03-30

我也是遇到同样的问题
0
2
大目
回复
梅村
应该是这样的: nameserver里面记录的是IP1,但是您的IP发生了变化(比如重启了,或者断网重连了,比如变成了IP2),所以导致nameserver找不到broker。 而重启后,新的消息,会用IP2,所以又能正常使用了。
2020-03-31
共2条回复

大目

2020-02-26

org.apache.rocketmq.client.exception.MQClientException: No route info of this topic, add-bonus

从异常来看,是你rocketmq的nameserver找不到该topic所属的broker地址导致的。

建议将rockermq和微服务部署在同一个局域网内,并且别用虚拟机。

0
0

Spring Cloud Alibaba微服务从入门到进阶

面向未来微服务:熟练掌握Spring Cloud Alibaba

3085 学习 · 1324 问题

查看课程