This topic describes the billable items and pricing of subscription instances in Message Queue for MQTT.

Subscription instances

The following table describes the billable items of subscription instances in Message Queue for MQTT.

Billable item Definition Description Example
Maximum number of concurrent connections The maximum number of TCP connections to a single instance at a point in time. The number of concurrent connections is a transient value. The value is updated every minute. The maximum number of connections must be at least equal to the actual number of active connections for the service. Otherwise, throttling can be triggered in Message Queue for MQTT during peak hours, and some clients may fail to connect to the service. Assume that the number of concurrent connections to instance_a was 1,000 at 10:00 and 2,000 at 10:01. To ensure that the service can run as expected, you must set the maximum number of concurrent connections for instance_a to a value greater than 2,000. For example, you can set the value to 5,000.
Maximum transactions per second (TPS) for messaging The maximum number of messages that are sent and received per second by using protocols supported by Message Queue for MQTT.
  • To avoid service exceptions, make sure that the maximum messaging TPS is at least equal to the actual messaging TPS.
  • These messages include only the messages that are sent and received by using Message Queue for MQTT, and do not include the messages that are sent and received by using Message Queue for Apache RocketMQ.
  • The TPS for sending messages and the TPS for receiving messages are counted in the messaging TPS.
  • If the system fails to push a message for which the QoS level is set to 1 and cleanSession is set to false, the system stores the message as an offline message for retrying. The system increases the number of calls by 1 each time an offline message is stored.
  • You are charged for messages, including calls to the client API and the cloud API. In billing, the system calculates the number of messages as the product of the number of messages that correspond to a transmission quality level in the specified protocol multiplied by the calculation ratio that corresponds to this level. For example, if the number of messages that correspond to a transmission quality level is 1, the system calculates the number of messages as the product of 1 multiplied by the corresponding calculation ratio. For more information, see Calculation ratios.
Assume that instance_a has 100 clients, and cleanSession is set to true for each client. Each client sends one QoS 0 message, two QoS 1 messages, and three QoS 2 messages per second, and receives one QoS 0 message, one QoS 1 message, and one QoS 2 message per second. In this case, the messaging TPS on instance_a is calculated by using the following formula: 100 × (1 + 2 × 2 + 3 × 5) + 100 × (1 + 1 × 2 + 1 × 5) = 2,800/s. To ensure that the service can run as expected, you must set the maximum messaging TPS for instance_a to a value greater than 2,800/s. For example, you can set the value to 3,000/s.
Maximum number of subscriptions The maximum number of subscription rules that you register with the Message Queue for MQTT broker.
  • To avoid service exceptions, make sure that the maximum number of subscriptions is at least equal to the actual number of subscriptions.
  • Each subscription to a Message Queue for MQTT topic by a client ID is counted as one subscription.
  • The number of subscriptions is counted every minute. The Message Queue for MQTT broker collects the maximum value that is obtained in each statistical period.
  • The Message Queue for MQTT broker maintains topic subscriptions for clients based on the Message Queuing Telemetry Transport (MQTT) protocol. If cleanSession is set to true on a client, the broker cancels all topic subscriptions for the client when the client goes offline. If cleanSession is set to false on a client, the broker retains all topic subscriptions for the client even if the client goes offline.
Assume that client_1 and client_2 are connected to instance_a, client_1 subscribes to TopicA/sub_1, TopicA/sub_2, and TopicB/sub_1, and client_2 subscribes to TopicA/sub_1 and TopicB/sub_2. In this case, the number of subscriptions for instance_a is five. To ensure that the service can run as expected, the maximum number of subscriptions for instance_a must be greater than five. For example, you can set the value to 1,000.

Pricing

The following table describes the pricing details for the maximum number of concurrent connections to subscription instances in Message Queue for MQTT.

Instance edition Maximum number of connections Price (USD/month)
Basic Edition 1,000 29
5,000 142
10,000 284
20,000 567
50,000 1417
100,000 2833
Platinum Edition 100,000 3852
300,000 11329
500,000 18805
1,000,000 37836
2,000,000 75446

The following table describes the pricing details for the maximum messaging TPS on subscription instances in Message Queue for MQTT.

Instance edition Maximum TPS for messaging Price (USD/month)
Basic Edition 1,000 284
5,000 1417
10,000 2833
20,000 5665
Platinum Edition 20,000 5211
50,000 7930
100,000 12009
200,000 18125
500,000 42368

The following table describes the pricing details for the maximum number of subscriptions in subscription instances in Message Queue for MQTT.

Instance edition Maximum number of subscriptions Price (USD/month)
Basic Edition 1,000 12
10,000 114
50,000 567
100,000 1133
200,000 2266
500,000 5665
1,000,000 11329
Platinum Edition 100,000 1586
500,000 7477
1,000,000 15180
2,000,000 30133
5,000,000 75446