Error-Aliyun-ONS-JavaSDK:Caused by: com.aliyun.openservices.shade.com.alibaba.rocketmq.client.exception.MQClientException: No route info of this topic, DEV_TBMCAL

ylbtech-Error-Aliyun-ONS-JavaSDK:Caused by: com.aliyun.openservices.shade.com.alibaba.rocketmq.client.exception.MQClientException: No route info of this topic, DEV_TBMCAL
1.返回顶部
1、

"C:\Program Files\Java\jdk-14\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.4\lib\idea_rt.jar=60066:C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.4\bin" -Dfile.encoding=UTF-8 -classpath D:\work\java\mq-demo-master\tcp\java-tcp-demo\target\classes;C:\Users\Administrator\.m2\repository\com\aliyun\openservices\ons-client\1.8.4.Final\ons-client-1.8.4.Final.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring\2.5.6.SEC03\spring-2.5.6.SEC03.jar;C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-api\1.7.7\slf4j-api-1.7.7.jar;C:\Users\Administrator\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.7\jcl-over-slf4j-1.7.7.jar;C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-log4j12\1.7.7\slf4j-log4j12-1.7.7.jar;C:\Users\Administrator\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar com.aliyun.openservices.tcp.example.producer.SimpleMQProducer
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.aliyun.openservices.ons.api.impl.rocketmq.ONSUtil (file:/C:/Users/Administrator/.m2/repository/com/aliyun/openservices/ons-client/1.8.4.Final/ons-client-1.8.4.Final.jar) to field java.util.Properties.defaults
WARNING: Please consider reporting this to the maintainers of com.aliyun.openservices.ons.api.impl.rocketmq.ONSUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
log4j:WARN No appenders could be found for logger (com.aliyun.openservices.shade.io.netty.util.internal.logging.InternalLoggerFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Producer Started
com.aliyun.openservices.ons.api.exception.ONSClientException: defaultMQProducer send exception
at com.aliyun.openservices.ons.api.impl.rocketmq.ProducerImpl.checkProducerException(ProducerImpl.java:242)
at com.aliyun.openservices.ons.api.impl.rocketmq.ProducerImpl.send(ProducerImpl.java:136)
at com.aliyun.openservices.tcp.example.producer.SimpleMQProducer.main(SimpleMQProducer.java:44)
Caused by: com.aliyun.openservices.shade.com.alibaba.rocketmq.client.exception.MQClientException: No route info of this topic, DEV_TBMCAL
See http://rocketmq.apache.org/docs/faq/ for further details.
at com.aliyun.openservices.shade.com.alibaba.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendDefaultImpl(DefaultMQProducerImpl.java:586)
at com.aliyun.openservices.shade.com.alibaba.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1137)
at com.aliyun.openservices.shade.com.alibaba.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1091)
at com.aliyun.openservices.shade.com.alibaba.rocketmq.client.producer.DefaultMQProducer.send(DefaultMQProducer.java:257)
at com.aliyun.openservices.ons.api.impl.rocketmq.ProducerImpl.send(ProducerImpl.java:127)
... 1 more
Sun Mar 29 22:43:29 CST 2020 Send mq message failed! Topic is:DEV_TBMCAL

2、
2. 导致错误原因返回顶部
1、接入点配置RocketMQ版本 含老用户的既有资源。请把“NAMESRV_ADDR”改为“ONSAddr”试试
1.1
producerProperties.setProperty(PropertyKeyConst.NAMESRV_ADDR, MqConfig.NAMESRV_ADDR);
1.2
producerProperties.setProperty(PropertyKeyConst.ONSAddr, MqConfig.NAMESRV_ADDR);

1.3 官方帮助文档

1.3.1

为兼容老用户的既有资源,消息队列 RocketMQ 版实例可分为以下两种

  • 默认实例(兼容老用户的既有资源):
    • 无独立命名空间,实例内或者跨实例之间,资源命名必须全局唯一;
    • 消息队列 RocketMQ 版老用户来说,既有资源所在地域将自动生成一个默认的无独立命名空间实例;
    • 接入点配置(可在控制台实例详情页面中获取): 
      // 推荐配置
      properties.put(PropertyKeyConst.NAMESRV_ADDR, "xxxx");
      // 兼容配置(不推荐继续使用,建议逐渐升级为推荐配置)
      properties.put(PropertyKeyConst.ONSAddr, "xxxx");                  
  • 新建实例:
    • 有独立命名空间,资源命名确保实例内唯一,跨实例之间可重名;
    • 接入点配置(可在控制台实例详情页面中获取): 
      // 推荐配置
      properties.put(PropertyKeyConst.NAMESRV_ADDR, "xxx");    
    • ons-client 客户端必须升级到最新版本:

1.3.2、

https://help.aliyun.com/document_detail/102895.html

2、

3.返回顶部
 
4.返回顶部
 
5.返回顶部
 
 
6.返回顶部
 
warn 作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

猜你喜欢

转载自www.cnblogs.com/storebook/p/12601520.html