This topic describes the limits and specifications for specific metrics in Message Queue for MQTT. To prevent exceptions on your applications, set these metrics to valid values based on these limits when you use Message Queue for MQTT. The following tables describe the specific limits.

If you use Message Queue for MQTT Platinum Edition, you can modify specific metrics based on your business requirements. The following table describes the metrics that you can modify. To obtain technical support and modify metrics, click to submit a ticket.

Limits on instances

Item Limit Description
Instance name
  • An instance name must be 3 to 64 characters in length.
  • An instance name can contain digits, letters, hyphens (-), and underscores (_). The name is not case-sensitive.
  • An instance name must be unique in the same region.
You cannot specify the name of an instance when you create the instance. The default name of a new instance is the ID of the instance. To change the instance name, go to the Message Queue for MQTT console.
Number of messaging transactions per second (TPS) on a single instance Throttling is triggered based on the specifications of the instance that you purchased. The service does not ensure that messages are received by the destination Message Queue for MQTT clients when the specified threshold value in the instance specifications is exceeded. A single Message Queue for MQTT client can publish and subscribe to only a small number of messages. Specific SDKs do not support a large number of messaging TPS. We recommend that you set the messaging TPS on a single Message Queue for MQTT client to no more than 20. If you require a larger number of messaging TPS on your cloud server, you can use the Message Queue for Apache RocketMQ client.
Number of Message Queue for MQTT clients that are connected to a single instance Throttling is triggered based on the specifications of the instance that you purchased. The service does not ensure that messages are received by the destination Message Queue for MQTT clients when the specified threshold value in the instance specifications is exceeded. By default, Message Queue for MQTT sends alerts if the maximum number of Message Queue for MQTT clients that are connected to a single instance is exceeded. Change the maximum value to a suitable value.
Number of subscriptions on a single instance Throttling is triggered based on the specifications of the instance that you purchased. The service does not ensure the integrity of subscriptions when the specified threshold value in the instance specifications is exceeded. By default, Message Queue for MQTT sends alerts if the number of subscriptions on a single instance is exceeded. Change the maximum value to a suitable value.
IP addresses of the domain name that is used as the endpoint of an instance No The IP address may unexpectedly change. Do not assume that the IP address is fixed. The technical team of Message Queue for MQTT is not responsible for faults and direct losses or indirect losses in the following scenarios:
  • Your Message Queue for MQTT client uses an IP address instead of a domain name to access the service. The original IP address becomes invalid after the technical team of Message Queue for MQTT updates the domain name resolution.
  • A firewall policy on IP addresses is set in the network in which your Message Queue for MQTT client is running. New IP addresses are blocked due to the firewall policy after the technical team of Message Queue for MQTT updates the domain name resolution.

Limits on topics

Item Limit Description
Topic name
  • A topic name must be 3 to 64 characters in length.
    Note The length of a topic name refers to the total length of the name for a parent topic and the subtopics.
  • A topic name can contain digits, letters, hyphens (-), and underscores (_). The name is not case-sensitive.
  • The name of a parent topic on the same instance must be unique.
When you use Message Queue for MQTT to publish and subscribe to messages, the length of a topic name must be in the valid range. If the length of the topic is not in the valid range, you cannot publish or subscribe to messages.
Number of parent topics on a single instance Maximum value: 25 If the default maximum value cannot meet your requirements, click to submit a ticket to increase the maximum value.
Use of topics across regions Not supported A data exchange rule is configured, and relevant resources of Message Queue for MQTT and Message Queue for Apache RocketMQ must be in the same region for data exchange. For more information, see Region-specific topics.

Limits on clients

Item Limit Description
Client ID
  • A client ID must be 0 to 64 characters in length.
  • A client ID can contain digits, letters, hyphens (-), and underscores (_).
When you use Message Queue for MQTT to publish and subscribe to messages, make sure that the client ID does not exceed 64 characters in length. If the client ID exceeds 64 characters in length, the client may be disconnected.
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 at the same time. If the number of subscribed topics reaches 30, new subscriptions cannot be added. If you use Message Queue for MQTT Platinum Edition, you can click to submit a ticket to increase the maximum value.

If topics are subscribed to by using a subscription that contains wildcards, the topics are counted as a 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 a subscribed topic. A/# and A/a1/# are counted as two subscribed topics.

Group ID
  • A group ID must be 7 to 64 characters in length.
  • A group ID can contain digits, letters, hyphens (-), and underscores (_). It must start with GID_ or GID-.
  • A group ID must be unique on the same instance.
When you use Message Queue for MQTT to publish and subscribe to messages, the length of a group ID must be in the valid range. If the length of the group ID exceeds the valid range, the messages cannot be published or subscribed to.
Number of subscriptions that contain wildcards Each parent topic supports up to 100 subscriptions that contain wildcards. The Message Queue for MQTT broker supports a limited number of active subscriptions that contain wildcards for each parent topic. When the maximum value is exceeded, the Message Queue for MQTT broker loads only 100 subscriptions. As a result, some subscribers may fail to receive messages. Therefore, you must 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.

Limits on rules

Item Limit Description
Number of rules for a single instance 100 If the default maximum value cannot meet your requirements, click to submit a ticket to increase the maximum value.
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 in Message Queue for MQTT.

Limits on publishing and subscribing to messages

Item Limit Description
Message size 64 KB If the size of a message exceeds the maximum value, the message is discarded.

If you use Message Queue for MQTT Platinum Edition, you can click to submit a ticket to increase the maximum value.

Message retention period Three days Message Queue for MQTT retains offline messages only when 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 elapses. For information about the QoS and cleanSession parameters, see Terms.

If you use Message Queue for MQTT Platinum Edition, you can click to submit a ticket to increase the message retention period.

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 Message Queue for MQTT to publish and subscribe to messages, you can perform the following configurations:
  • If the cleanSession parameter is set to true, the QoS parameter can be set to 0, 1, or 2.
  • If the cleanSession parameter is set to false, the QoS parameter cannot be set to 2. Message Queue for MQTT does not support this configuration.
Validity period of the 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.
Period of waiting for a message timeout or failure Maximum period: 10 seconds The first time that the Message Queue for MQTT broker pushes a message, the broker cannot determine whether this message is converted to an offline message before this message times out or fails. The waiting period ranges from 5 seconds to 10 seconds.
Number of stored offline messages Maximum value: 1,000,000 The Message Queue for MQTT broker of an instance limits the number of offline messages stored on the instance. If the maximum value is exceeded, the Message Queue for MQTT broker deletes the earliest offline messages that are stored. To prevent an excessive number of offline messages, set the cleanSession parameter to a suitable value when you subscribe to topics.

If the default maximum value cannot meet your requirements, click to submit a ticket to increase the maximum value.

Limits on cloud API operations

For information about the maximum number of queries per second (QPS) for the cloud API, see QPS limits.