首页 FAQ about message sending

FAQ about message sending

更新时间: 2026-01-15 01:47:44

When the client first connects to the ApsaraMQ forRocketMQ broker, the connection fails and messages cannot be sent, how do I fix the issue?

Check whether the following configurations are valid:
  • Check whether the endpoint is correctly specified. You can obtain the endpoint from the Instance Details page in the ApsaraMQ for RocketMQ console.
  • Run the telnet Endpoint domain name Port command to check the network connectivity.
    • If your application is deployed on an on-premises device or if you want to access ApsaraMQ forRocketMQ across regions but cannot build a network by using Cloud Enterprise Network (CEN), you must use a public endpoint to access the ApsaraMQ for RocketMQ instance. If you use a public endpoint to access ApsaraMQ forRocketMQ, you are charged for Internet outbound traffic. For more information, see Internet traffic fee for ApsaraMQ forRocketMQ 4.x instances or Internet traffic fee for ApsaraMQ forRocketMQ 5.x instances.
    • If your application is deployed on an Elastic Compute Service (ECS) instance, you can use a virtual private cloud (VPC) endpoint to access the ApsaraMQ for RocketMQ instance. In this case, you must make sure that the ECS instance resides in the same region as the ApsaraMQ for RocketMQ instance.
  • If you enable the Internet access feature for a ApsaraMQ forRocketMQ 5.0 instance, confirm whether an IP address whitelist is configured. By default, all IP addresses can access ApsaraMQ forRocketMQ. If an IP address whitelist is configured, only the IP addresses in the whitelist can access ApsaraMQ for RocketMQ.
  • Check whether the topic name is valid. The topic name cannot contain extra spaces or special characters. Check whether the topic exists in the ApsaraMQ forRocketMQ console.
  • Check whether the username and password are valid.
    • ApsaraMQ forRocketMQ 5.0 instances: You must specify the username and password of the instance. You can obtain the instance username and password on the Instance Details page in the ApsaraMQ forRocketMQ console.
    • ApsaraMQ forRocketMQ 4.0 instances: You must specify the AccessKey ID and AccessKey secret of the Alibaba Cloud account or RAM user. If you use a RAM user, make sure that the RAM user is granted the required permissions. For information about how to obtain the AccessKey ID and AccessKey secret, see Create an AccessKey pair.

Why does an error that indicates the message is invalid appears when I send a message?

Possible causes:
  • The message body is empty.
  • The message body exceeds the size limit. The following items describe the maximum size of a message body in different instances:
    • 5.x series instances:

      Maximum: 4 MB.

    • 4.x series instances:

      • Normal and ordered messages: 4 MB

      • Transactional, scheduled, and delayed messages: 64 KB

      Note

      The size of custom properties for any message cannot exceed 16 KB.