ApsaraMQ for RocketMQ is a distributed platform from Alibaba Cloud that is based on Apache RocketMQ. It provides a unified solution for processing messages, events, and streams with low latency, high concurrency, high availability, and high reliability. After the release of Apache RocketMQ 5.0, Alibaba Cloud ApsaraMQ for RocketMQ now offers the more stable and reliable server version 5.x. This topic describes the differences and compatibility between server versions 5.x and 4.x of ApsaraMQ for RocketMQ.
Advantages of version 5.x
Compared with previous server versions, ApsaraMQ for RocketMQ 5.x provides the following advantages:
Advanced architecture
Version 5.x uses a decoupled architecture that separates storage from computing. This design allows storage and computing resources to be scaled horizontally and independently as needed. This architecture supports efficient elastic operations and maintenance (O&M) and provides high-performance, large-scale capacity.
Simplified development
Version 5.x supports access through client SDKs that are fully compatible with Apache RocketMQ. It also maintains compatibility with all previous SDK versions and API operations.
It supports security authentication within a VPC. To migrate to the cloud, you only need to modify the endpoint without changing your code.
Simplified O&M
Version 5.x provides solutions such as automatic elasticity and lightweight test environments to address common challenges. These challenges include online capacity assessment, handling fluctuations in service traffic, and managing daily grayscale environments. This simplifies overall O&M and reduces risks.
More flexible costs
Optimized with cloud-native technology, version 5.x supports a combination of reserved and burst traffic elasticity for message processing. This means you do not need to reserve a large buffer for burst traffic.
Message storage is pay-as-you-go. Compared with attached disks that cannot be scaled down, this model offers a significant advantage in elasticity.
Broader offerings
Version 5.x offers a more comprehensive range of instance types with complete subscription and pay-as-you-go pricing models.
New LiteTopic model for improved asynchronous communication in AI applications
This model addresses common pain points in AI services, such as long task processing times, scarce and expensive computing power, and the challenge of balancing computing power utilization with fluctuating service traffic. It provides a lightweight topic feature and corresponding solutions. Developers can use this model to easily build a robust, efficient, and scalable asynchronous communication system. This system can manage request peaks, relieve backend processing pressure, and thereby improve resource utilization and reduce costs.
SDK versions
The following table describes the features supported by different SDK versions of ApsaraMQ for RocketMQ.
In the table, ✅ indicates that the feature is supported, and ❌ indicates that the feature is not supported.
Item | ||||||
Protocol | gRPC protocol v2 | Remoting protocol | Remoting protocol | Remoting protocol | gRPC protocol v1 | HTTP protocol |
Accessible instances | 5.x series instances |
|
|
| 4.x series instances | 4.x series instances |
Recommendation | Use the 5.x gRPC SDK.
|
|
| |||
Sending normal, ordered, transactional, and scheduled messages | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Concurrent consumption | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Ordered consumption | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Ordered consumption with optimized concurrency | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
Broadcasting consumption | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ |
Stream consumption (connecting to Flink, etc.) | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ |
Message trace | ✅ | ✅ | Supported in versions 4.5.2 and later | ✅ | ✅ | ❌ |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | |
✅ | Supported only for 5.x series instances | ❌ | ❌ | ❌ | ❌ | |
Feature compatibility between versions 4.x and 5.x
Instances of ApsaraMQ for RocketMQ 5.x are optimized based on the production practices of large-scale enterprise customers. Some feature behaviors in the message sending and receiving process have been adjusted. Therefore, parameter configurations and feature behaviors may differ in some scenarios. These differences generally do not affect the primary message processing flow. If you upgrade an existing 4.x instance to 5.x, you must assess the risks as needed.
The specific differences in feature behavior are as follows:
Feature difference | Version 4.x | Version 5.x | Description |
Maximum delay for scheduled messages | 40 days |
| Long delay parameters can pose stability risks to the system. Do not set an excessively long delay. Use shorter delays to simulate your business scenarios. For more information, see Scheduled and delayed messages. If you are migrating an existing 4.x instance and the maximum delay does not meet your requirements, submit a ticket for consultation. |
HTTP protocol support | Supported | Not supported | Version 5.x does not support the HTTP protocol. If your existing 4.x instance uses the HTTP protocol, postpone the upgrade. |
RAM authorization policy | Data link + control link | Supports the control link, but the authorization policy is different from that of version 4.x |
|
Global message routing | Supported | Not supported | Version 5.x does not support configuring global message routing tasks. You must use the message integration feature to synchronize messages between instances. For more information, see Message integration. |
Message type restrictions | No restrictions | Strict restrictions | In version 5.x, message types are separated into topics for independent O&M and processing. The system strictly verifies that the type of a sent message matches the message type defined for the topic. If the verification fails, the message sending request is rejected, and a type mismatch exception is returned. For more information, see Topic behavior constraints. |
Purchase restrictions
Instances of ApsaraMQ for RocketMQ 5.x are available for purchase by all users.
Instances of ApsaraMQ for RocketMQ 4.x are available for purchase only by existing users. We recommend that you upgrade your instances to version 5.x. To upgrade, submit a ticket.
Upgrade from version 4.x to 5.x
In-place upgrades from version 4.x to 5.x using an upgrade tool are not currently supported. To upgrade an existing instance to version 5.x, you must purchase a 5.x instance and gradually migrate your service traffic to the new instance, as shown in the following figure.
As shown in the preceding figure, you can use the topic and group import and export features in the second step to quickly create metadata. For more information, see Import and export topics and Import and export groups.
When you migrate your services, you can use the dual-read, dual-write, and phased release solution shown in the following figure.
