All Products
Search
Document Center

ApsaraMQ for RocketMQ:Why is the "MQClientException: No route info of this topic" error returned when I attempt to send messages?

Last Updated:Dec 04, 2023

Problem description

When you use a TCP client SDK to send messages, the following error is returned by the ApsaraMQ for RocketMQ broker:

Caused by: com.aliyun.openservices.shade.com.alibaba.rocketmq.client.exception.MQClientException: No route info of this topic

Possible causes:

  • The endpoint specified in the code is different from the endpoint provided in the ApsaraMQ for RocketMQ console.

  • The topic name specified in the code is inconsistent with the name of the created topic.

  • The SDK version is incorrect. You must use an SDK whose version is later than 1.7.9.Final to access an instance that has a namespace. If your instance has a namespace and the error does not contain {instanceId}%{topic}, the SDK version that you use is incorrect.

Solution

  1. Log on to the ApsaraMQ for RocketMQ console.

  2. On the Instance Details page, view the endpoint of the instance and check whether the endpoint specified in the code is consistent with the endpoint provided in the console.

  3. On the Topics page, check whether the topic is created or correctly specified in the code.

  4. In the Basic Information section of the Instance Details page, check whether the instance has a namespace. If the instance has a namespace and the error message does not contain {instanceId}%{topic}, the SDK version is incorrect. Make sure that the SDK version used is later than 1.7.9.Final.