ApsaraMQ for MQTT charges are based on the instance edition and the resources consumed during message transmission. Billing methods, billable items, and protocol-level settings all affect your costs.
Instance editions and billing methods
ApsaraMQ for MQTT offers two instance editions: Enterprise Platinum Edition and Basic Edition. Both use the Subscription billing method -- you select resource specifications and pay upfront to activate your instance.
| Edition | Billing method | Description |
|---|---|---|
| Enterprise Platinum Edition | Subscription | Select resource specifications and pay upfront. This method allows you to reserve resources in advance at a discount, ideal for large-traffic, long-term usage. |
| Basic Edition | Subscription | Select resource specifications and pay upfront. This method allows you to reserve resources in advance at a discount, ideal for large-traffic, long-term usage. |
For feature differences between editions, see Instance editions.
Pay-as-you-go instances are no longer available for purchase. Existing pay-as-you-go instances continue to run normally. For details, see Pay-as-you-go instances (end of sale).
Supported regions
For regions where ApsaraMQ for MQTT is available, see Supported regions.
Billable items
The following diagram shows the billable items for ApsaraMQ for MQTT.
For detailed pricing of each item, see Billing of Basic Edition and Enterprise Platinum Edition instances.
Calculation coefficients
The Quality of Service (QoS) level and the cleanSession parameter in the MQTT protocol directly affect how messages are counted for billing.
How message counting works
All messages are billable, including calls to the client API and the cloud API. The system calculates the billed message count using the following formula:
Billed messages = Actual message count x Calculation coefficient
Coefficient reference
QoS and cleanSession combination | Coefficient |
|---|---|
QoS=0, cleanSession=true | 1 |
QoS=1, cleanSession=true | 2 |
QoS=1, cleanSession=false | 5 |
QoS=2, cleanSession=true | 5 |
QoS=2withcleanSession=falseis not supported. If you specify this combination, the coefficient is 5.QoS=0withcleanSession=falseis not supported. If you specify this combination, the coefficient is 1.
For more information about QoS and cleanSession, see Terms.
Data exchange with other Alibaba Cloud services
If you use ApsaraMQ for MQTT V3.x.x to exchange data with other Alibaba Cloud services through rules, those services charge separately based on their own billing policies. ApsaraMQ for MQTT supports data exchange with ApsaraMQ for RocketMQ only. ApsaraMQ for RocketMQ charges topic occupancy fees and API call fees. For details, see ApsaraMQ for RocketMQ billing overview.