You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/07/21 04:04:44 UTC

[GitHub] [rocketmq-spring] fangqyou opened a new issue, #470: 接入阿里云rocketMQ,本地发送消息失败,但是在阿里云控制台发送的消息可以消费!

fangqyou opened a new issue, #470:
URL: https://github.com/apache/rocketmq-spring/issues/470

   
   异常信息:
   org.springframework.messaging.MessagingException: No route info of this topic: trace_17_track_notify
   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: trace_17_track_notify
   See http://rocketmq.apache.org/docs/faq/ for further details.
   	at org.apache.rocketmq.spring.core.RocketMQTemplate.syncSend(RocketMQTemplate.java:566) ~[rocketmq-spring-boot-2.2.2.jar:2.2.2]
   	at org.apache.rocketmq.spring.core.RocketMQTemplate.syncSend(RocketMQTemplate.java:487) ~[rocketmq-spring-boot-2.2.2.jar:2.2.2]
   	at org.apache.rocketmq.spring.core.RocketMQTemplate.syncSend(RocketMQTemplate.java:475) ~[rocketmq-spring-boot-2.2.2.jar:2.2.2]
   	at org.apache.rocketmq.spring.core.RocketMQTemplate.doSend(RocketMQTemplate.java:977) ~[rocketmq-spring-boot-2.2.2.jar:2.2.2]
   	at org.apache.rocketmq.spring.core.RocketMQTemplate.doSend(RocketMQTemplate.java:60) ~[rocketmq-spring-boot-2.2.2.jar:2.2.2]
   	at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:109) ~[spring-messaging-5.3.21.jar:5.3.21]
   	at com.example.springbootmqtest.SaticScheduleTask.configureTasks(SaticScheduleTask.java:23) ~[classes/:na]
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_252]
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_252]
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_252]
   	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_252]
   	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-5.3.21.jar:5.3.21]
   	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.3.21.jar:5.3.21]
   	at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95) [spring-context-5.3.21.jar:5.3.21]
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_252]
   	at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) [na:1.8.0_252]
   	at java.util.concurrent.FutureTask.run(FutureTask.java) [na:1.8.0_252]
   	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_252]
   	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_252]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_252]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_252]
   	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_252]
   Caused by: org.apache.rocketmq.client.exception.MQClientException: No route info of this topic: trace_17_track_notify
   See http://rocketmq.apache.org/docs/faq/ for further details.
   	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendDefaultImpl(DefaultMQProducerImpl.java:675) ~[rocketmq-client-4.9.3.jar:4.9.3]
   	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1367) ~[rocketmq-client-4.9.3.jar:4.9.3]
   	at org.apache.rocketmq.client.producer.DefaultMQProducer.send(DefaultMQProducer.java:354) ~[rocketmq-client-4.9.3.jar:4.9.3]
   	at org.apache.rocketmq.spring.core.RocketMQTemplate.syncSend(RocketMQTemplate.java:558) ~[rocketmq-spring-boot-2.2.2.jar:2.2.2]
   	... 21 common frames omitted
   
   配置:
   
   ![image](https://user-images.githubusercontent.com/49676298/180127562-16b9d5c4-cd18-4a75-8971-d1c051ad172e.png)
   
   发送代码:
   @Configuration     
   @EnableScheduling   
   public class SaticScheduleTask {
   
       String topic = "trace_17_track_notify";
   
       @Resource
       private RocketMQTemplate rocketMQTemplate;
   
       //3.添加定时任务
       @Scheduled(cron = "0/10 * * * * ?")
       private void configureTasks() {
           rocketMQTemplate.send(topic, MessageBuilder.withPayload("消息内容xxx").build());
       }
   }
   消费代码:
   @Component
   @RocketMQMessageListener(topic = "trace_17_track_notify", consumerGroup = "GID_TEST_GROUP")
   public class TestListener implements RocketMQListener<MessageExt> {
       @Override
       public void onMessage(MessageExt messageExt) {
           String msgId = messageExt.getMsgId();
           System.out.println(msgId);
       }
   }
   
   阿里云工作台信息:
   
   ![image](https://user-images.githubusercontent.com/49676298/180127711-8c596f4d-895f-4edb-934a-c5de14ad4ae3.png)
   
   
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-spring] RongtongJin closed issue #470: 接入阿里云rocketMQ,本地发送消息失败,但是在阿里云控制台发送的消息可以消费!

Posted by GitBox <gi...@apache.org>.
RongtongJin closed issue #470: 接入阿里云rocketMQ,本地发送消息失败,但是在阿里云控制台发送的消息可以消费!
URL: https://github.com/apache/rocketmq-spring/issues/470


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] 接入阿里云rocketMQ,本地发送消息失败,但是在阿里云控制台发送的消息可以消费! [rocketmq-spring]

Posted by "PudgeXD (via GitHub)" <gi...@apache.org>.
PudgeXD commented on issue #470:
URL: https://github.com/apache/rocketmq-spring/issues/470#issuecomment-1809648209

   try to configure '**rocketmq.consumer.namespace**' to the instaceId of the instance in Alibaba clound. It works for me.
   
   By checking the codes, 2.2.2 version add the feature of supporting namespace, while the codes did not care about the compatialbility. 
   As a result, since 2.2.2, we have to specify the namespace explicitly.
   
   namespace related issues:
   #396 
   #397 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-spring] YooLin commented on issue #470: 接入阿里云rocketMQ,本地发送消息失败,但是在阿里云控制台发送的消息可以消费!

Posted by "YooLin (via GitHub)" <gi...@apache.org>.
YooLin commented on issue #470:
URL: https://github.com/apache/rocketmq-spring/issues/470#issuecomment-1447504743

   2.2.2 版本是连不上 降到 2.2.1 版本就可以了


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-spring] fangqyou commented on issue #470: 接入阿里云rocketMQ,本地发送消息失败,但是在阿里云控制台发送的消息可以消费!

Posted by GitBox <gi...@apache.org>.
fangqyou commented on issue #470:
URL: https://github.com/apache/rocketmq-spring/issues/470#issuecomment-1192098844

   ok thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-spring] RongtongJin commented on issue #470: 接入阿里云rocketMQ,本地发送消息失败,但是在阿里云控制台发送的消息可以消费!

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #470:
URL: https://github.com/apache/rocketmq-spring/issues/470#issuecomment-1191118867

   Hi @fangqyou, we don't deal with Alibaba cloud related problems. You can submit a work order to Alibaba cloud. You are welcome to report bugs or contribute features to rocketmq-spring.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org