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

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

"C:Program FilesJavajdk-14injava.exe" "-javaagent:C:Program FilesJetBrainsIntelliJ IDEA 2019.3.4libidea_rt.jar=60066:C:Program FilesJetBrainsIntelliJ IDEA 2019.3.4in" -Dfile.encoding=UTF-8 -classpath D:workjavamq-demo-master cpjava-tcp-demo argetclasses;C:UsersAdministrator.m2 epositorycomaliyunopenservicesons-client1.8.4.Finalons-client-1.8.4.Final.jar;C:UsersAdministrator.m2 epositoryorgspringframeworkspring2.5.6.SEC03spring-2.5.6.SEC03.jar;C:UsersAdministrator.m2 epositoryorgslf4jslf4j-api1.7.7slf4j-api-1.7.7.jar;C:UsersAdministrator.m2 epositoryorgslf4jjcl-over-slf4j1.7.7jcl-over-slf4j-1.7.7.jar;C:UsersAdministrator.m2 epositoryorgslf4jslf4j-log4j121.7.7slf4j-log4j12-1.7.7.jar;C:UsersAdministrator.m2 epositorylog4jlog4j1.2.17log4j-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_SPUAT
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_SPUAT

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/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
原文地址:https://www.cnblogs.com/storebook/p/12601520.html