Introduction Message Queue for MQTThelp you choose the appropriate instance types and billing modes as needed.

Usage notes

  • Message Queue for MQTTSince V3.x.x release no longer begins Message Queue for Apache RocketMQis the storage. Single Message Queue for MQTTinstance can create up to 25 topics. The error message returned because the number of instances has been exceeded. submit a ticket processing, the future will charge for the excess resources.
  • If you use Message Queue for MQTTin Apsara stack V3.x.x, you can use rules to interact with other Alibaba cloud products. The corresponding fees are subject to the billing instructions of the specific products. For the currently only supported Message Queue for Apache RocketMQ, a Topic resource occupation fee and API call fee are charged. For more information, see Message Queue for Apache RocketMQdetailed price overview.

Billing method

Message Queue for MQTTThe instance types are as follows:

Item Platinum Edition Basic Edition Pay-as-you-go
Billing method Dedicated instance (physical isolation). You can use exclusive hardware resources to protect your instances. Each instance is deployed as a cluster independently. Such instances will not be affected by service peaks of other users, providing after-sales services and ensuring stability with a higher priority. Shared instances (logical isolation). Where multiple instances share the same backend cluster, Message Queue for MQTTto ensure service availability in multi-tenant scenarios. Shared instances (logical isolation). Where multiple instances share the same backend cluster, Message Queue for MQTTto ensure service availability in multi-tenant scenarios.
Metering methods Cloud Firewall uses the subscription billing method. Subscription is billed based on the specification. Pay-as-you-go. Pay-as-you-go is billed based on the actual usage.
Scenarios
  • Large-scale services are running.
  • There is a need for customization.
  • This system has high requirements on the maximum message sending and receiving TPS, maximum number of connections, and maximum number of subscriptions.
  • Small business scale.
  • Low requirements on the maximum message sending and receiving TPS, maximum number of connections, and maximum number of subscriptions
  • Changes in business scale.
  • Changes in the number of sent and received messages, connections, and subscriptions.
Service Support Product consulting DingTalk Group
Alibaba Cloud engineering single channel Cost Cost
Exclusive Channel for Alibaba Cloud tickets Cost Cost
System launch and promotion support service Cost Cost
Exclusive Support DingTalk Group Cost Cost
Dedicated Service manager support Cost Cost
Exclusive technical expert support

Provides direct technical support from the core R&D team.

Cost Cost
Point-to-point fault handling

on-call for 24 hours × 7 days.

Cost Cost
Features Subscription relationship restriction for a single device (rule) Theoretically unlimited

Custom subscription restrictions (rules) for a single device.

Up to 30 Up to 30
MessageRetentionPeriod Up to 7 days

Custom message retention time

Up to 3 days Up to 3 days
Protocol Type MQTT

Customizable protocol.

MQTT MQTT
Device online /offline notification
P2P support
Message tracing Cost Cost
Ordered message
Third-party account authorization
WebSocket support
API operations
Note ✓ indicates that the service or feature is supported, and // indicates that the service or feature is not supported. Obtain a product consulting DingTalk group, see Contact us.

subscription

Message Queue for MQTTThe following table describes the billing items for subscription instances.

Item Definition Description Example value
Maximum number of concurrent connections The maximum number of client TCP connections on a single instance at any time. The number of concurrent online connections is a transient value and is updated every minute. Make sure that the upper limit of the number of online connections is greater than or equal to the actual number of business connections, avoid business connections in the peak pulse is triggered Message Queue for MQTTservice throttling, causing some clients to fail to connect. If you set instance_a to 1,000 simultaneous connections at 10:00 and 2,000 simultaneous connections at 10:01, then instance_a needs to exceed the maximum number of 2,000 connections (for example, 5,000) to ensure the normal operation of the service.
Maximum message TPS Use per second Message Queue for MQTTthe maximum number of messages that can be sent uplink and received downlink.
  • Make sure that the maximum message TPS is greater than or equal to the actual message TPS to avoid service exceptions.
  • The message TPS only involves Message Queue for MQTTthe message is sent and received, which does not involve Message Queue for Apache RocketMQthe number of messages to be sent and received.
  • The message TPS section consists of the message receiving TPS and message sending TPS.
  • If messages with QoS=1 and cleanSession=false are not pushed successfully, they are stored as offline messages and will be retried. Offline message storage is also considered as one push call.
  • Each message is priced at one. Messages in a specific protocol are counted with a multiplication ratio to indicate the transmission quality. For more information, see Calculation ratio.
instance_a has 100 clients, and cleanSession is set to true for each client. This method sends one QoS0 message, two QoS1 messages, and three QoS2 messages per second, and receives one QoS0 message, one QoS1 message, and one QoS2 message per second. If the message TPS of instance_a is 100 x(1+2 x 2+3 x 5)+100 x(1+1 x 2+1 x 5)= 2800 messages /second, instance_a needs to exceed the maximum message TPS of 2800 messages /second (3000 messages /second). To ensure normal service operation.
Maximum number of subscription relationships The maximum number of subscription rules that you can register with the MQTT broker.
  • Make sure that the maximum number of business subscription relationships is greater than or equal to that of business subscription relationships to avoid business exceptions.
  • Each subscription to an MQTT Topic by a Client ID is counted as one subscription relationship.
  • The number of subscription relationships is counted every minute. The MQTT broker outputs the maximum value obtained in the statistical cycle.
  • According to the MQTT protocol, if cleanSession is set to true on an MQTT client, the MQTT broker cancels all its topic subscriptions after the MQTT client goes offline. If cleanSession is set to false, the MQTT broker retains its topic subscriptions.
instance_a has two devices: client_1 and client_2. client_1 subscribes to TopicA/sub_1, TopicA/sub_2, and TopicB/sub_1. client_2 subscribes to TopicA/sub_1 and TopicB/sub_2. instance_a has three subscription relationships (3+2 = 5). Therefore, instance_a needs to contain more than five subscription relationships (1000, for example). To ensure normal service operation.

Message Queue for MQTTThe following figure shows the billing method for the maximum number of connections for a subscription instance.

Billing method Maximum number of concurrent connections Price (CNY)
Basic Edition instance 1,000 13
1 thousand 125
5 thousand 625
10,000 1,250
20,000 2500
50,000 6250
100,000 12500
Enterprise Platinum Edition instance 100,000 17000
300,000 50,000
500,000 83000
1 million 167000
2 million 333000

Message Queue for MQTTThe following figure shows the maximum message delivery network (TPS) billing method for subscription instances.

Billing method Maximum message transactions per second Price (CNY)
Basic Edition instance 1,000 125
1 thousand 1,250
5 thousand 6250
10,000 12500
20,000 25,000
Enterprise Platinum Edition instance 20,000 23000
50,000 35000
100,000 53000
200,000 80,000
500,000 187000

Message Queue for MQTTThe following figure shows the billing method for the maximum number of subscriptions for a subscription instance.

Billing method Maximum number of subscription relationships Price (CNY)
Basic Edition instance 1 thousand 500
10,000 500
50,000 2500
100,000 5,000
200,000 10000
500,000 25,000
1 million 50,000
Enterprise Platinum Edition instance 100,000 7,000
500,000 33000
1 million 67000
2 million 133000
5 million 333000

Pay-as-you-go

Message Queue for MQTTThe following table describes the billing items for pay-as-you-go instances.

Item Definition Description Example value
Concurrent online connections The number of client TCP connections on a single instance at any time. The number of concurrent online connections is a transient value and is updated every minute. The billing cycle is one day, that is, the maximum number of concurrent online connections in the 24 hours from 00:00 in the previous day is counted in the daily bill. The number of concurrent online connections at instance_a 2017-08-08 10:00 was 1000,2017-08-08: 00 was 2000, and did not reach 2000 after 2017-08-08. The maximum number of concurrent online connections of instance_a on 2017-08-08 was 2000, and the billing value was 2000.
Sent and received messages Use Message Queue for MQTTthe total number of messages that are sent uplink and received downlink.
  • The billing cycle is one day. The total number of messages that are received and sent in the 24 hours from 00:00 in the previous day is counted in the daily bill.
  • Message sending and receiving only involves passing through Message Queue for MQTTthe message is sent and received, which does not involve Message Queue for Apache RocketMQthe number of messages to be sent and received.
  • Message sending and receiving includes message receiving and message sending.
  • If messages with QoS=1 and cleanSession=false are not pushed successfully, they are stored as offline messages for retrying. Offline message storage is also considered as one push call.
  • Each message is priced at one. Messages in a specific protocol are counted with a multiplication ratio to indicate the transmission quality. For more information, see Calculation ratio.
instance_a has 100 clients, and cleanSession is set to true for each client, which sends one QoS0 message, two QoS1 messages, three QoS2 messages, one QoS0 message, one QoS1 message, and one QoS2 message. The number of sent and received messages of instance_a is 100 x(1+2 x 2+3 x 5)+100 x(1+1 x 2+1 x 5)=2,800, and the billing value is 2,800.
Subscription relationships The number of subscription relationships refers to the number of subscription rules that a user has registered with the MQTT broker. The billing cycle is one day, that is, the maximum number of subscription relationships in the 24 hours from 00:00 of the previous day is counted in the daily bill. The number of subscription relationships for instance_a 2017-08-08 10:00 is 1,000, 500 are deleted at 11:00 on 2017-08-08, and the number is not reached at all at the following time. The maximum number of subscription relationships for instance_a on 2017-08-08 is 1,000, and the billing value is 1,000.

Message Queue for MQTTThe following table lists the billing rules for concurrent online connections of a pay-as-you-go instance.

Number of concurrent online connections (count) Price (CNY)
[1, 100] 0.03
> 100 Number of concurrent online connections × 0.003

Message Queue for MQTTThe billing rules for the number of sent and received messages of a pay-as-you-go instance are as follows:

Number of sent and received messages (10,000) Price (CNY)
> 0 Sent and received messages × 0.04
Note If the number of sent and received messages is less than 10,000, the billing is performed for 10,000 messages. For example, if the number of sent and received messages is 10,000, the billing is based on 20,000 messages, that is, 2 × 0.04=RMB 0.08.

Message Queue for MQTTThe following table describes the billing rules for the subscription of pay-as-you-go instances.

Subscription relationships Price (CNY)
[1, 100] 0.02
> 100 Number of concurrent online connections × 0.0002

Calculation ratio

Message Queue for MQTTThe message pricing ratio is as follows:

Transmission quality level Calculation ratio
QoS = 0 and cleanSession = true in MQTT 1
QoS = 0 and cleanSession = false in MQTT 1
QoS = 1 and cleanSession = true in MQTT 2
QoS = 1 and cleanSession = false in MQTT 5
QoS=2 and cleanSession=true in MQTT 5
Note Message Queue for MQTTThe MQTT protocol does not support QoS=2 and cleanSession=false. However, if you set the transmission quality level, the price is calculated by 5 times the billing unit.