Messaging is a core capability of ApsaraMQ for RocketMQ and is enabled by default when you activate the service. Standard Edition instances use pay-as-you-go billing for messaging. The monthly cost has two components:
| Billing component | What it covers | How it accumulates |
|---|---|---|
| API call fees | Messages sent to and received from the server | Monthly, per Alibaba Cloud account |
| Topic occupancy fees | Each topic created on your instance | Daily, per topic |
Each Alibaba Cloud account receives a free quota of 20 million API calls per month. The pricing below applies only to usage that exceeds this quota.

API call fees
Formula:
API call fees = (Messages received + Messages delivered) x Unit price
Metering rules
| Billing dimension | How it is counted | Example |
|---|---|---|
| Normal messages | Each message received by the server counts as 1. Each message delivered counts as 1, regardless of whether consumption succeeds. | Send 100 messages, deliver 100 messages = 200 total |
| Featured messages | Multiply the count by 5. Featured messages include transactional, ordered, scheduled, and delayed messages. | 1 transactional message received + 2 deliveries = (1 x 5) + (2 x 5) = 15 |
| Message size | Billing uses 4 KB as the base unit. Each 4 KB chunk counts as 1 message. Maximum message body size: 4 MB. | A 16 KB message counts as 16 / 4 = 4 messages |
| HTTP long polling | If the server returns messages, count them using the rules above. If no messages arrive within the wait period (up to 30 seconds), the request counts as 1 delivery. | 1 empty long-polling response = 1 delivery |
| HTTP short polling | The server returns an empty response immediately. Each request counts as 1 delivery. | 10 empty short-polling requests = 10 deliveries |
Short polling with idle topics generates many billable empty requests. To reduce costs, use long polling and increase the wait time. For more information, see Operation for consuming messages.
ApsaraMQ for RocketMQ supports four message types: normal, scheduled and delayed, transactional, and ordered. Only normal messages are basic messages. All other types are featured messages and billed at a 5x multiplier. For more information, see Message types.
Unit prices
API call fees use tiered pricing based on your monthly accumulated message throughput per Alibaba Cloud account.
| Billing tier | Monthly throughput (100 million calls) | UAE (Dubai), Singapore, China (Hong Kong), Japan (Tokyo), UK (London), Germany (Frankfurt), US (Virginia), US (Silicon Valley) | Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila) | Internet, China (Hangzhou), China (Shanghai), China (Shenzhen), China (Chengdu), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot) | SAU (Riyadh - Partner Region) |
|---|---|---|---|---|---|
| First | 0 - 10 | 0.45 | 0.42 | 0.31 | 0.54 |
| Second | 10 - 50 | 0.41 | 0.38 | 0.28 | 0.492 |
| Third | 50 - 100 | 0.34 | 0.31 | 0.23 | 0.408 |
| Fourth | 100 - 500 | 0.30 | 0.27 | 0.20 | 0.36 |
| Fifth | > 500 | 0.27 | 0.25 | 0.19 | 0.324 |
Unit: USD/million calls.
If an Alibaba Cloud account authorizes another account through a Resource Access Management (RAM) role, the authorizing account is billed. If an Alibaba Cloud account authorizes RAM users under its own account, the Alibaba Cloud account is billed.
Billing examples
Calculate message throughput
A producer sends the following messages daily:
7 million normal messages (each 40 KB), with 8 million deliveries due to multiple consumer groups and re-deliveries
3 million featured messages (each 2 KB), with 3 million deliveries
Daily message throughput = (Normal received + Normal delivered) x Size multiplier + (Featured received + Featured delivered) x 5 x Size multiplier
= (7M + 8M) x ceil(40 / 4) + (3M + 3M) x 5 x ceil(2 / 4)
= 15M x 10 + 6M x 5 x 1
= 180 million messages
ceil() rounds up to the nearest integer. A 2 KB message uses the minimum unit of 4 KB, so ceil(2 / 4) = 1.
Calculate API call fees
Assume your instance is in China (Shanghai) and processes 500 million messages daily. As throughput accumulates over the month, the applicable tier and unit price change:
| Day | Daily throughput | Accumulated monthly throughput | Tier | Unit price (USD/million) | Daily fee (USD) |
|---|---|---|---|---|---|
| 1st | 500M | 500M | First | 0.31 | 155 |
| 2nd | 500M | 1B | First | 0.31 | 155 |
| 3rd | 500M | 1.5B | Second | 0.28 | 140 |
| 4th | 500M | 2B | Second | 0.28 | 140 |
| ... | ... | ... | ... | ... | ... |
| 11th | 500M | 5.5B | Third | 0.23 | 115 |
The unit price drops as accumulated throughput crosses tier boundaries -- higher volumes pay lower per-call rates.
Topic occupancy fees
Formula:
Topic occupancy fees = Unit price x Number of topics x Number of days
Each topic incurs a daily fee based on its message throughput that day.
Topics are billed even when idle. Delete unused topics to avoid unnecessary charges.
Unit prices
Topic occupancy fees use tiered pricing based on daily message throughput per topic.
| Billing tier | Daily throughput (10,000 calls/topic) | China (Hong Kong), Singapore, Japan (Tokyo), UAE (Dubai), US (Virginia), US (Silicon Valley), Germany (Frankfurt), UK (London) | Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila) | Internet, China (Hangzhou), China (Shanghai), China (Shenzhen), China (Chengdu), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot) | SAU (Riyadh - Partner Region) |
|---|---|---|---|---|---|
| First | 0 - 100 | 0.45 | 0.42 | 0.31 | 0.54 |
| Second | 100 - 500 | 0.34 | 0.31 | 0.23 | 0.408 |
| Third | 500 - 1,000 | 0.11 | 0.11 | 0.08 | 0.132 |
| Fourth | > 1,000 | 0 | 0 | 0 | 0 |
Unit: USD/topic/day.
If an Alibaba Cloud account authorizes another account through a RAM role, the authorizing account is billed. If an Alibaba Cloud account authorizes RAM users under its own account, the Alibaba Cloud account is billed.
Billing example
Assume your instance is in China (Shanghai) with multiple topics. Each topic is billed daily based on its own throughput:
| Day | Topic | Daily throughput | Tier | Fee (USD) |
|---|---|---|---|---|
| 1st | Topic_1 | 100,000 | First | 0.31 |
| 1st | Topic_2 | 5,500,000 | Third | 0.08 |
| 2nd | Topic_1 | 1,200,000 | Second | 0.23 |
| 2nd | Topic_2 | 800,000 | First | 0.31 |
| 3rd | Topic_1 | 300,000 | First | 0.31 |
| 3rd | Topic_2 | 100,000 | First | 0.31 |
The daily topic occupancy fee is the sum of fees for all topics active that day. Topics with daily throughput exceeding 10 million calls (fourth tier) are not charged for occupancy.
FAQ
How are featured messages counted for billing?
Featured messages (transactional, ordered, scheduled, and delayed) are billed at a 5x multiplier. Both sending and receiving use this multiplier. For example, sending 1 transactional message and delivering it to 2 consumers results in (1 x 5) + (2 x 5) = 15 billable calls.
Am I charged for failed message deliveries?
Yes. Each delivery attempt counts as a billable event, regardless of whether the consumer successfully processes the message.
How does billing work with RAM users?
All usage by RAM users is billed to the parent Alibaba Cloud account. If account A delegates access to account B through a RAM role, account A (the authorizing account) is billed.
What happens if I use short polling on an idle topic?
Each short-polling request to an idle topic counts as 1 delivery. This generates billable calls even with no messages. Switch to long polling and increase the wait time to reduce costs.