Messaging billing details

Updated at:

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 componentWhat it coversHow it accumulates
API call feesMessages sent to and received from the serverMonthly, per Alibaba Cloud account
Topic occupancy feesEach topic created on your instanceDaily, per topic
Note

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.

Billing formula for Standard Edition messaging fees

API call fees

Formula:

API call fees = (Messages received + Messages delivered) x Unit price

Metering rules

Billing dimensionHow it is countedExample
Normal messagesEach 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 messagesMultiply 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 sizeBilling 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 pollingIf 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 pollingThe server returns an empty response immediately. Each request counts as 1 delivery.10 empty short-polling requests = 10 deliveries
Important

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.

Note

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.

Unit: USD/million calls.

Note

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

Note

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:

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.

Important

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.

Unit: USD/topic/day.

Note

Billing example

Assume your instance is in China (Shanghai) with multiple topics. Each topic is billed daily based on its own throughput:

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.