This article introduces you Message Queue for MQTTthe constraints and specifications for specific indicators, so that you can use Message Queue for MQTTdo not exceed the corresponding limit value to avoid program exceptions. The following table lists these limits:

If you have purchased the enterprise Platinum Edition Message Queue for MQTT, you can customize some indicators as needed (marked in the following table). For more information, consult submit a ticket.

Table 1. Limits on using Message Queue for MQTT
Item Threshold Description
Topic length 64 characters Use Message Queue for MQTTthe Topic length cannot exceed 64 characters in length for sending and receiving messages. Otherwise, messages cannot be sent or subscribed to.
Usage of topics across regions None Message Queue for MQTTThe message queue for Apache rocketmq instance maintains the message queue for Apache rocketmq instance with the message queue for Apache rocketmq instance. Message Queue for Apache RocketMQThe topics of the instance must be in the same region. For more information, see Region-specific topics.
Characters available for topics and client IDs Digits 0-9, letters a-z or A-Z, hyphen (-), and underscore (_) Message Queue for MQTT does not support non-conventional characters such as slashes (/), colons (:), commas (,), and percent signs (%) in client IDs and topics. If these characters are used, connection setup may fail and messages cannot be sent or received.
Client ID length 64 characters Use Message Queue for MQTTthe Client ID length cannot exceed 64 characters. Otherwise, the Client may be disconnected.
Message size 64 KB The payload of a message cannot exceed 64 kB. Otherwise, the message may be discarded. (This metric is customizable in the enterprise Platinum Edition.)
Message retention period 3 days Offline messages are retained for a maximum of three days only when QoS=1 and cleansession=false. After three days, the offline messages are automatically deleted in a scrolling manner. (This metric is customizable in the enterprise Platinum Edition.)
Messaging transactions per second (TPS) Depends on instance specifications.
  • For a subscription instance, throttling is imposed based on the purchased specifications. Message delivery is not guaranteed when the limit specified in the instance specifications is exceeded.
  • The message TPS of pay-as-you-go instances cannot exceed 50,000. Otherwise, traffic may be throttled by the system. If necessary, submit a ticket.
  • Generally, the number of messages sent and received by a single MQTT client is small, and some SDKs do not support the design. We recommend that the TPS of a single MQTT client is no greater than 20. If you want to send and receive a large number of messages and your application is hosted on the broker, you can use the Message Queue for Apache RocketMQclient.
Number of connected clients Depends on instance specifications. For a subscription instance, throttling is imposed based on the purchased specifications. Connection stability is not guaranteed when the limit specified in the instance specifications is exceeded. For a pay-as-you-go instance, throttling is not imposed, but the monitoring and alerting functions are provided by default. You must adjust the monitoring threshold appropriately.
Number of subscriptions Depends on instance specifications. For a subscription instance, throttling is imposed based on the purchased specifications. The integrity of subscriptions is not guaranteed when the limit specified in the instance specifications is exceeded. For a pay-as-you-go instance, throttling is not imposed, but the monitoring and alerting functions are provided by default. You must adjust the monitoring threshold appropriately.
Topics to which a Message Queue for MQTT client can subscribe 30 topics Use Message Queue for MQTTeach message client can subscribe to a maximum of 30 topics at a time when the maximum number of these topics is exceeded. New subscriptions cannot be added when the limit is exceeded. (This metric is customizable in the enterprise Platinum Edition.)
QoS and cleanSession Currently, cleanSession cannot be set to false when QoS is 2. Currently, the Message Queue for MQTT broker does not support subscriptions when QoS is set to 2 and cleanSession is set to false. To receive offline messages, set QoS to 1 and cleanSession to false. That is, use QoS 1 and a persistent session.
Token validity period 30 days When the token API is called with the value of ExpireTime greater than 30 days, the token is returned without any error messages. However, the token is actually valid for 30 days.
Message sequence Publishing sequence Use Message Queue for MQTTcurrently, only the ordering of messages sent by each client is guaranteed when messages are sent and received. If messages must be consumed in order, you must specify the Message Queue for Apache RocketMQreceive messages through TCP.
Time consumed on waiting for message timeout or failure 10 seconds When the Message Queue for MQTT broker pushes a message for the first time, it determines whether this message is converted to an offline message only after this message times out or fails. The corresponding delay ranges from five seconds to 10 seconds.
Number of stored offline messages 1,000,000 (if the default limit is not met, please submit a ticket request processing) The Message Queue for MQTT broker restricts the number of offline messages that are stored on each instance. If this limit is exceeded, the Message Queue for MQTT broker cleans up messages from the earliest message. Therefore, use the cleanSession parameter appropriately during subscription to avoid too many useless offline messages.
Wildcard subscriptions Each parent topic allows only 100 wildcard subscriptions. The Message Queue for MQTT broker restricts the maximum number of active wildcard subscriptions for each parent topic. When the limit is exceeded, the Message Queue for MQTT broker loads only 100 subscriptions and some subscribers may fail to receive messages. Therefore, you must control the number of wildcard subscriptions.
Message Queue for MQTTThe IP address of the endpoint. None
The IP address may be changed at any time. Do not assume that the IP address is fixed. Problems in the following use cases Message Queue for MQTTthe product Party is not responsible for:
  • The client uses the IP address instead of the domain name for access. As a result, the original IP address becomes invalid.
  • After you set up a network firewall policy for IP addresses in client networks, the new IP addresses will be blocked by the firewall policy.