This topic describes the constraints and specifications for specific metrics in Message Queue for MQTT. To avoid program exceptions, you must set these metrics to values that do not exceed these limits when you use Message Queue for MQTT. The following table lists these limits.
If you are using the Enterprise Platinum Edition of Message Queue for MQTT, you can customize some metrics as needed, which are marked in the following table. For more information, submit a ticket.
|Topic length||3 to 64 characters||When you use Message Queue for MQTT to send and receive a message, the topic length must be in the valid range. Otherwise, the message cannot be sent or subscribed to.|
|Number of topics in a single instance||25||You must pay for topics that exceed this limit. For more information, submit a ticket.|
|Usage of topics across regions||None||Relevant resources of Message Queue for MQTT and Message Queue for Apache RocketMQ must be in the same region for data interconnection. For more information, see Region-specific topics.|
|Characters available for topics and client IDs||Digits, letters, hyphens (-), and underscores (_)||Message Queue for MQTT does not support the following non-conventional characters in client IDs and topics.
If these characters are used, connection setup may fail and messages cannot be sent
|Client ID length||64 characters||When you use Message Queue for MQTT to send and receive a message, the client ID length cannot exceed 64 characters. Otherwise, the client may be disconnected.|
|Number of rules for a single instance||100||If you need a higher limit, submit a ticket.|
|Rule deduplication||Only one rule of the same type can be created for an internal resource.||For example, you can create only one rule for client status notification for a group ID, and one data inbound rule and one data outbound rule for a topic in Message Queue for MQTT.|
|Message size||64 KB||The size of a message cannot exceed 64 KB. Otherwise, this message is discarded. This metric can be customized in the Enterprise Platinum Edition.|
|Message retention period||Three days||Offline messages are retained for a maximum of three days only when the quality of service (QoS) is set to 1 and cleanSession is set to false. After three days, the offline messages are automatically deleted in a rolling manner. This metric can be customized in the Enterprise Platinum Edition.|
|Messaging transactions per second (TPS)||Depends on instance specifications.||
|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 features 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 features are provided by default. You must adjust the monitoring threshold appropriately.|
|Number of topics to which a single Message Queue for MQTT client can subscribe||30||Each Message Queue for MQTT client can subscribe to a maximum of 30 topics when Message Queue for MQTT is used to send and receive messages. New subscriptions cannot be added when this limit is exceeded. This metric can be customized in the Enterprise Platinum Edition.|
|QoS and cleanSession||The cleanSession parameter cannot be set to false when QoS is 2.||When you use Message Queue for MQTT to send and receive messages:
|Token validity period||30 days||When the ApplyToken operation is called with the value of ExpireTime greater than 30 days, the token is returned without any error messages. However, the token is valid for only 30 days.|
|Messaging in order||Sending in order||When you use Message Queue for MQTT to send and receive messages, only Message Queue for MQTT clients send messages in order. We recommend that you use Message Queue for Apache RocketMQ to receive messages over TCP if you need to consume messages in order.|
|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 5 seconds to 10 seconds.|
|Number of stored offline messages||1,000,000. If you need a higher limit, submit a ticket.||The Message Queue for MQTT broker of an instance restricts the number of offline messages that are stored on the 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 excessive 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.|
|IP address corresponding to the Message Queue for MQTT domain name||None||
The IP address may be changed at any time. Do not assume that the IP address is fixed. The Message Queue for MQTT product team is not liable for any direct or indirect faults or losses arising in the following scenarios: