This topic describes the limits on specific metrics in ApsaraMQ for MQTT. To prevent exceptions on your applications, specify valid values for these metrics when you use ApsaraMQ for MQTT. The following tables describe the limits.
If you use ApsaraMQ for MQTT Enterprise Platinum Edition instances, you can specify custom values for specific metrics described in the following tables. To specify custom values for the metrics, join the DingTalk group 35228338 to contact the ApsaraMQ for MQTT technical support.
Instances
Item | Limit | Description |
Instance name |
| When you create an instance, you cannot specify a custom name for the instance. The default name of a new instance is the ID of the instance. To change the instance name, go to the ApsaraMQ for MQTT console. |
Messaging TPS of a single instance | Throttling is triggered based on the purchased specification. If the specified transactions per second (TPS) threshold is exceeded, issues such as disconnections, response timeout, and message discard may occur on open source MQTT client SDKs and cloud SDKs. In this case, ApsaraMQ for MQTT does not ensure the reliable delivery of messages. | A single ApsaraMQ for MQTT client publishes and subscribes to only a small number of messages. Specific SDKs do not support large messaging TPS. We recommend that you specify up to 20 messaging TPS on a single ApsaraMQ for MQTT client. If you require larger messaging TPS on your cloud server, you can use an ApsaraMQ for RocketMQ client. |
Number of ApsaraMQ for MQTT clients connected to a single instance | Throttling is triggered based on the purchased specification. If the specified threshold of the instance specification is exceeded, requests for new connections may be denied. | If the maximum number of ApsaraMQ for MQTT clients connected to a single instance is exceeded, ApsaraMQ for MQTT automatically sends alerts. We recommend that you specify the alerting threshold based on your business requirements. |
Number of subscriptions in a single instance | If the specified threshold in the specification is exceeded, you may fail to create new subscriptions, connections for existing subscriptions may be interrupted, and existing subscriptions may not be intact. | If the number of subscriptions in a single instance is exceeded, ApsaraMQ for MQTT automatically sends alerts. We recommend that you specify the alerting threshold based on your business requirements. |
IP address of the domain name used as the endpoint of an instance | None. | The IP address may unexpectedly change. Do not assume that the IP address is fixed. ApsaraMQ for MQTT technical team is not responsible for faults or direct or indirect losses in the following scenarios:
|
Topics
Item | Limit | Description |
Topic name |
| When you use ApsaraMQ for MQTT to publish and subscribe to messages, the name of a topic must be in the valid length range. Otherwise, you cannot publish or subscribe to messages. |
Number of parent topics on a single instance | 25 | If the default value does not meet your business requirements, join DingTalk group 35228338 to contact the ApsaraMQ for MQTT technical support. Note No limit is imposed on the number of subtopics. We recommend that you create no more than 1,000 subtopics to ensure the stable running of your business. |
Cross-region use of topics | Not supported. | If a rule is configured for data exchange between ApsaraMQ for MQTT and ApsaraMQ for RocketMQ, the corresponding resources must reside in the same region. |
Clients
Item | Limit | Description |
Client ID |
| When you use ApsaraMQ for MQTT to publish and subscribe to messages, the client ID cannot exceed 64 characters in length. Otherwise, the client is disconnected. |
Group ID |
| When you use ApsaraMQ for MQTT to publish and subscribe to messages, the group ID must be in the valid length range. Otherwise, you cannot publish or subscribe to messages. |
Device ID |
| When you use ApsaraMQ for MQTT to publish and subscribe to messages, the device ID cannot exceed 64 characters in length. Otherwise, the client is disconnected. |
Number of topics to which a client can subscribe | 30 | Each client can subscribe to up to 30 topics at the same time. If the number of subscribed topics reaches 30, new subscriptions cannot be added. If you use an ApsaraMQ for MQTT Enterprise Platinum Edition instance, you can increase the maximum number of topics to which the client can subscribe. To increase the number, join the DingTalk group 35228338 to contact the ApsaraMQ for MQTT technical support. If topics are subscribed to by using a subscription that contains wildcards (*), the topics are counted as one subscribed topic. If different subtopics of the same parent topic are subscribed to, each subtopic is counted as a subscribed topic. For example, A/# is counted as one subscribed topic. A/# and A/a1/# are counted as two subscribed topics. |
Number of subscriptions that contain wildcards (*) | Each parent topic supports up to 100 subscriptions that contain wildcards (*). | The ApsaraMQ for MQTT broker supports a limited number of active subscriptions that contain wildcards (*) for each parent topic. If the maximum value is exceeded, the ApsaraMQ for MQTT broker loads only 100 subscriptions. As a result, some subscribers may fail to receive messages. We recommend that you strictly control the number of subscriptions that contain wildcards. For example, the subscriptions to A/#, A/a1, and A/a2/# under the same Parent Topic A are counted as three subscriptions. |
Maximum heartbeat interval | 8 minutes | When you use ApsaraMQ for MQTT to publish and subscribe to messages, the maximum heartbeat interval that you can specify is 8 minutes. |
Message inbound, message outbound, and client status notification rules
Item | Limit | Description |
Number of rules for a single instance | 100 | If the default value does not meet your business requirements, join DingTalk group 35228338 to contact the ApsaraMQ for MQTT technical support. |
Rule deduplication | Only one rule of the same type can be created for each internal resource. | For example, you can create only one rule for client status notification for each group ID, and one data inbound rule and one data outbound rule for each topic on ApsaraMQ for MQTT. |
Region | You cannot create rules across regions. The instances to which the data source and data destination of a rule belong must reside in the same region. | For example, if you create a data outbound rule in which the data source is specified as ApsaraMQ for MQTT in the China (Hangzhou) region, you can select only an ApsaraMQ for RocketMQ instance in the China (Hangzhou) region as the data destination. |
ApsaraMQ for MQTT instance version | You can create rules for only instances whose kernel version is 3.x.x. | You can view the kernel version of an ApsaraMQ for MQTT instance in the instance list or on the Instance Details page in the ApsaraMQ for MQTT console. |
ApsaraMQ for RocketMQ instance version | Only ApsaraMQ for RocketMQ 4.0 instances are supported. | When you exchange data between ApsaraMQ for MQTT and ApsaraMQ for RocketMQ by using a data inbound rule or a data outbound rule, you can use only ApsaraMQ for RocketMQ 4.0 instances. |
Messaging
Item | Limit | Description |
Message size | 64 KB | If the size of a message exceeds the maximum value, the message is discarded. If you use an ApsaraMQ for MQTT Enterprise Platinum Edition instance, you can increase the maximum message size. To increase the maximum message size, join the DingTalk group 35228338 to contact the ApsaraMQ for MQTT technical support. |
Message retention period | 3 days | ApsaraMQ for MQTT retains offline messages only if the QoS parameter is set to 1 and the cleanSession parameter is set to false. The offline messages can be retained for up to three days and are automatically deleted after this period is elapsed. For information about the QoS and cleanSession parameters, see Terms. If you use an ApsaraMQ for MQTT Enterprise Platinum Edition instance, you can increase the message retention period. To increase the message retention period, join the DingTalk group 35228338 to contact the ApsaraMQ for MQTT technical support. |
QoS and cleanSession configurations | You cannot set the QoS parameter to 2 and the cleanSession parameter to false at the same time. | When you use ApsaraMQ for MQTT to publish and subscribe to messages, you can specify the following configurations:
|
Validity period of a token | 30 days | When you call the ApplyToken operation, if the ExpireTime parameter is set to a value greater than 30, a token is returned and no error is reported. The validity period of this token is still 30 days. |
Waiting period for offline messages | Maximum period: 10 seconds | The first time an ApsaraMQ for MQTT broker pushes a message, the broker can determine whether the message is converted to an offline message only after the message times out or fails. The waiting period ranges from 5 seconds to 10 seconds. |
Number of stored offline messages | 1,000,000 | The ApsaraMQ for MQTT broker of an instance limits the number of offline messages that are stored on the instance. If the maximum value is exceeded, the ApsaraMQ for MQTT broker deletes the earliest stored offline messages. To prevent an excessive number of offline messages, set the cleanSession parameter to an appropriate value when you subscribe to topics. If the default value does not meet your business requirements, join DingTalk group 35228338 to contact the ApsaraMQ for MQTT technical support. |