Messaging is the basic feature of Message Queue for Apache RocketMQ. After you activate Message Queue for Apache RocketMQ, the messaging feature is available by default. This topic describes the pricing details about the messaging feature of Message Queue for Apache RocketMQ and provides billing examples.

Standard Edition instances

Standard Edition instances are billed on a pay-as-you-go basis. They are applicable to scenarios where the number of messages is small or significantly fluctuates in different periods of time. You are charged only for the messages transmitted and the resources you used. This allows you to maximize resource usage.

Free service quotas

Standard Edition instances of Message Queue for Apache RocketMQ are billed on a pay-as-you-go basis and offer free service quotas for some items. The following items are temporarily free. You will be notified by a mobile text message, Alibaba Cloud announcement, or site message if these items are no longer free of charge.

Note The following items are free only for pay-as-you-go instances. These items are not free for subscription instances.
  • Message accumulation
  • The first 20 million API calls per month (cumulative in all regions)

Billable items

The messaging fees of a Standard Edition instance are calculated by using the following formula.

计费公式
API call fee = (Number of API calls to send messages + Number of API calls to subscribe to messages + Number of long polling API calls) × Unit price
The API call fee is calculated based on the number of API calls. Tiered pricing is used, and the unit price varies with the number of API calls per month and with the region. For more information about unit prices, see the Unit prices section in this topic.
  • Descriptions of the number of API calls to send and subscribe to messages:
    • One API call is counted if you initiate an API call to send or subscribe to one normal message no matter whether the call is successful.
    • The number of API calls to send and subscribe to featured messages is counted as five times that of API calls to send and subscribe to normal messages. For example, if you send a transactional message once and subscribe to the message twice, the number of API calls is 15 based on the formula: 1 × 5 + 2 × 5 = 15.
    • The maximum size of a message body is 4 MB, and the unit for calculating the number of transmitted messages is 4 KB. For example, if you send or subscribe to a 16 KB message, 4 API calls are billed based on the formula: 16/4 = 4.

    • Notes:Message Queue for Apache RocketMQ supports normal messages, scheduled messages, delayed messages, transactional messages, and ordered messages. Among them, scheduled messages, delayed messages, transactional messages, and ordered messages are featured messages. For more information, see Message types.
  • Descriptions of the number of long polling API calls:
    • A long polling request is an API call generated by Message Queue for Apache RocketMQ to push a message in real time. Each topic has multiple queues, and each queue generates a long polling request every 15 seconds. If a message is generated in the queue within these 15 seconds, the long polling request is not counted. If no messages are generated in the queue within these 15 seconds, one API call is counted.
    • The number of long polling API calls for featured messages is counted in the same manner as the number of long polling API calls for normal messages.
Topic usage fee = Number of topics × Unit price
Topic usage is billed based on the number of created topics. Tiered pricing is used, and the unit price varies with the number of API calls per topic per day. For more information about unit prices, see the Unit prices section in this topic.
Notes:You are charged for each topic that you create even if the topic has not been used to send and subscribe to messages. Therefore, we recommend that you delete unneeded topics at the earliest opportunity to avoid unnecessary fees.

Unit prices

  • The following table lists the unit prices for the API call fee.
    Table 1. API call fee
    Billing tier Number of API calls (100 million calls/month) Unit price by region (USD/1 million calls)
    China (Hong Kong), Singapore (Singapore), Japan (Tokyo), and UAE (Dubai) Malaysia (Kuala Lumpur), India (Mumbai), and Indonesia (Jakarta) China (Shanghai), Australia (Sydney), US (Virginia), US (Silicon Valley), Germany (Frankfurt), and UK (London)
    First tier 0~10 0.45 0.42 0.31
    Second tier 10~50 0.41 0.38 0.28
    Third tier 50~100 0.34 0.31 0.23
    Fourth tier 100~500 0.3 0.27 0.20
    Fifth tier More than 500 0.27 0.25 0.19
  • The following table lists the unit prices for the topic usage fee.
    Table 2. Topic usage fee
    Billing tier Number of API calls (100 million calls/topic/day) Unit price by region (USD/topic/day)
    China (Hong Kong), Singapore (Singapore), Japan (Tokyo), and UAE (Dubai) Malaysia (Kuala Lumpur), India (Mumbai), and Indonesia (Jakarta) China (Shanghai), Australia (Sydney), US (Virginia), US (Silicon Valley), Germany (Frankfurt), and UK (London)
    First tier 0~10 0.45 0.42 0.31
    Second tier 100~500 0.34 0.31 0.23
    Third tier 500~1000 0.11 0.11 0.08
    Fourth tier More than 1,000 0 0 0
    Note

    If you use an Alibaba Cloud account to authorize another Alibaba Cloud account, fees are charged to both the Alibaba Cloud accounts. If you use an Alibaba Cloud account to authorize Resource Access Management (RAM) users within the Alibaba Cloud account, the API calls made and topics used by the RAM users are charged to this Alibaba Cloud account.

Billing examples

For example, you create an instance in the China (Hangzhou) region. The following information shows the messaging data and the number of topics you created on the instance:

  • Number of created topics: 20
  • Total number of messages produced per day: 1 million (including 500,000 normal messages and 500,000 featured messages)
  • Message production-delivery ratio: 1 (1 million messages produced and 1 million messages delivered)
  • Average size of a single message: 40 KB
The messaging fees for the instance are calculated in the following way:
  • API call fee:

    Number of API calls: (500,000 + 500,000 × 5) × 2 × (40/4) = 60,000,000

    The unit price varies with the tier in which the number of API calls falls. The number 60 million falls in the first tier, and the corresponding unit price is CNY 2/1 million calls. Therefore, the total API call fee is CNY 120 based on the formula: (6000/100) × 2 = 120.

  • Topic usage fee:

    The number of created topics is 20. The unit price varies with the tier in which the number of API calls falls. The number of API calls per topic per day is 3 million based on the formula: 60 million/20 = 3 million. The number 3 million falls in the second tier, and the corresponding unit price is CNY 1.5/topic/day. Therefore, the topic usage fee is CNY 30 based on the formula: 20 × 1.5 = 30.

Messaging fees = API call fee + Topic usage fee = CNY 150

Enterprise Platinum Edition instances

Enterprise Platinum Edition instances are billed on a subscription basis. They are applicable to scenarios where the service level agreement (SLA) requirements are high or the number of messages is large. The subscription billing method allows you to reserve resources in advance and helps you minimize costs with high discounts.

Billable items

The messaging fees of an Enterprise Platinum Edition instance are calculated by using the following formula: 铂金版计费公式
  • Fee for the selected specification of maximum TPS: The maximum TPS indicates the maximum total number of messages sent and subscribed to per second.

    The minimum unit for calculating the number of messages sent and subscribed to is 1 KB of message body. If 5,000 messages are sent per second, 5,000 messages are delivered per second, and the average message body size for each message is 4 KB, the maximum TPS is 40,000 messages/second based on the formula: (4/1) × (5,000 + 5,000) = 40,000.

  • Fee for the selected topic specification: The topic specification indicates the maximum number of topics that you can create on the Enterprise Platinum Edition instance.
  • Fee for the selected storage specification: The storage specification indicates the size of the exclusive physical storage space for the Enterprise Platinum Edition instance.

Billing details

For more information about the pricing and related examples of Enterprise Platinum Edition instances, visit the buy page of Enterprise Platinum Edition instances.