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

Standard Edition instances

Standard Edition instances are billed on a pay-as-you-go basis. Standard Edition instances are suitable for scenarios in which the number of messages is small or the number of messages fluctuates greatly. You are charged only for the messages that are transmitted and the resources that you use. This way, resource utilization is improved.

Free quotas

Standard Edition instances of Message Queue for Apache RocketMQ are billed on a pay-as-you-go basis and support free quotas for specific items. The following items are provided free of charge. If these items are no longer free of charge, a text message, an Alibaba Cloud announcement, or an internal message is sent to all users.

Note The following items are provided free of charge only for pay-as-you-go instances. These items are not provided free of charge for subscription instances.
  • Message accumulation
  • The first 20 million API calls that are accumulated across all regions each month

Billable items

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

Messaging fees of a Standard Edition instance
API call fee = (Number of API calls made to send messages + Number of API calls made 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 based on the number of API calls that are made each month and the region. For more information about unit prices, see the Unit prices section in this topic.
  • The number of API calls that are required to send and subscribe to messages:
    • When you initiate an API call to send or subscribe to one standard message, the system counts this operation as one API call regardless of whether the call is successful.
    • The number of API calls that are required to send and subscribe to a featured message is equal to five times the number of API calls that are required to send and subscribe to a standard message. For example, if you send a transactional message once and subscribe to the message twice, the number of API calls is calculated based on the following formula: 1 × 5 + 2 × 5 = 15.
    • The maximum size of a message body is 4 MB. The size of the message that is transmitted in each API call is 4 KB. For example, if you send or subscribe to a 16 KB message, your instance is billed for 4 API calls. The number of API calls is calculated based on the following formula: 16/4 = 4.

    • Note:Message Queue for Apache RocketMQ supports standard messages, scheduled messages, delayed messages, transactional messages, and ordered messages. Scheduled messages, delayed messages, transactional messages, and ordered messages are featured messages. For more information, see Message types.
  • 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 uses multiple queues. Each queue receives a long polling at an interval of 15 seconds.
      • If a queue receives messages within a 15-second polling period, the system counts only the number of API calls that are made to send or receive messages. The system does not count the number of long polling API calls that you make.
      • If a queue does not receive messages within a 15-second polling period, the system counts the number of long polling API calls that you make. The following formula is used to calculate the number of long polling API calls on a topic within a 15-second polling period: Number of long polling API calls = Number of queues that receive long polling requests × Number of consumers × Number of consumer groups.
    • The number of long polling API calls for featured messages is calculated in the same manner as the number of long polling API calls for standard messages.
Topic usage fee = Number of topics × Unit price
Topic usage fee is calculated based on the number of topics that you created. Tiered pricing is used, and the unit price varies based on the number of API calls that are made to each topic each day. For more information about unit prices, see the Unit prices section in this topic.
Note: You are charged for each topic that you create regardless of whether you use the topic to send and subscribe to messages. We recommend that you delete the topics that are not required at the earliest opportunity to avoid excessive fees.

Unit prices

  • The following table lists the unit prices for API calls.
    Table 1. Pricing for API calls
    Billing tier Number of API calls (100 million calls/month) Unit price (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 topic usage.
    Table 2. Pricing for topic usage
    Billing tier Number of API calls (100 million calls/topic/day) Unit price (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, you are charged for both accounts. If you use an Alibaba Cloud account to authorize Resource Access Management (RAM) users in the Alibaba Cloud account, you are charged for the API calls that are made by the RAM users and the topics that are used by the RAM users.

Example

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

  • Number of created topics: 20
  • Total number of messages that are produced each day: 1 million (including 500,000 standard messages and 500,000 featured messages)
  • Message production to message 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 based on the following formula:
  • API call fee:

    The number of API calls is calculated based on the following formula: (500,000 + 500,000 × 5) × 2 × (40/4) = 60,000,000

    The unit price varies based on the tier into which the number of API calls falls. The number 60,000,000 falls into the first tier, and the unit price is USD 0.31 for one million API calls. The total API call fee is calculated based on this formula: (6,000/100) × 0.31 = 18.6.

  • Topic usage fee:

    The number of topics is 20. The unit price varies based on the tier into which the number of API calls falls. The number of API calls of each topic per day is calculated based on the following formula: 60,000,000/20 = 3,000,000. The number 3,000,000 is in the second tier, and the unit price is USD 0.23/topic/day. The topic usage fee is calculated based on this formula: 20 × 0.23 = 4.6.

Messaging fees = API call fee + Topic usage fee = USD 23.2

Enterprise Platinum Edition instances

Enterprise Platinum Edition instances are billed on a subscription basis. These instances are suitable for scenarios in which the service level agreement (SLA) requirements are high or the number of messages is large. The subscription billing method is used to reserve resources in advance and can help you reduce costs with high discounts.

Billable items

The messaging fees of an Enterprise Platinum Edition instance are calculated by using the following formula:Messaging fees for Enterprise Platinum Edition instances
  • Fee for the selected specification that provides maximum TPS: The maximum TPS specifies the total number of messages that can be sent and subscribed to each second.

    The maximum size of a message body is 4 MB. The size of the message that is transmitted in each API call is 4 KB. If 5,000 messages are sent each second, 5,000 messages are delivered each second, and the average message body size for each message is 16 KB, the maximum TPS is 40,000 messages/second. The maximum TPS is calculated based on this formula: (16/4) × (5,000 + 5,000) = 40,000.

  • Fee for the selected topic specification: The topic specification specifies 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.