-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
接入阿里云rocketMQ,本地发送消息失败,但是在阿里云控制台发送的消息可以消费! #470
Comments
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. |
ok thanks |
2.2.2 版本是连不上 降到 2.2.1 版本就可以了 @fangqyou |
try to configure 'rocketmq.producer.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. |
异常信息:
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
配置:
发送代码:
@configuration
@EnableScheduling
public class SaticScheduleTask {
}
消费代码:
@component
@RocketMQMessageListener(topic = "trace_17_track_notify", consumerGroup = "GID_TEST_GROUP")
public class TestListener implements RocketMQListener {
@OverRide
public void onMessage(MessageExt messageExt) {
String msgId = messageExt.getMsgId();
System.out.println(msgId);
}
}
阿里云工作台信息:
The text was updated successfully, but these errors were encountered: