Differences and compatibility between 4.x and 5.x versions
ApsaraMQ for RocketMQ is a distributed platform from Alibaba Cloud that unifies message, event, and stream processing. Built on Apache RocketMQ, it provides low latency, high concurrency, high availability, and high reliability. Following the release of Apache RocketMQ 5.0, ApsaraMQ for RocketMQ now offers a more stable and reliable server-side 5.x version. This topic describes the differences and compatibility between the server-side 5.x and 4.x versions of ApsaraMQ for RocketMQ.
5.x Version Advantages
Compared to previous server-side versions, ApsaraMQ for RocketMQ 5.x offers the following advantages:
More advanced architecture
It fully adopts a message architecture with storage-compute separation. Storage and computing resources can be scaled horizontally and independently as needed. This architecture supports efficient elastic O&M and provides high-performance, large-scale capabilities.
Lower development threshold
It primarily promotes the use of client SDKs that are fully consistent with Apache RocketMQ. It is also backward compatible with all previous SDK and API operation versions.
It supports secure identification within a VPC. To migrate to the cloud, you only need to modify the access point. No other code changes are required.
Lower O&M threshold
It provides solutions such as automatic rotation and elasticity, and a lightweight staging environment. These solutions address common challenges, such as online capacity assessment, elasticity for business peaks and troughs, and daily grayscale environments. This approach lowers the overall O&M threshold and reduces risks.
More flexible costs
By optimizing cloud infrastructure technology, the computing capabilities for sending and receiving messages support a combination of reserved and burst traffic. This means businesses do not need to reserve large buffers for burst traffic.
Message storage is pay-as-you-go. This model offers significant elastic advantages compared to attaching cloud disks, which cannot be scaled in.
More comprehensive sales models
It offers a more comprehensive set of tiered plans and supports both monthly and hourly pricing models.
New LiteTopic model provides better support for AI application asynchronous communication
It addresses common pain points, such as long processing times for AI business tasks, scarce and costly computing power resources, and conflicts between computing power utilization and business traffic fluctuations. It provides a lightweight topic feature and corresponding solutions. Developers can easily build a robust, efficient, and scalable asynchronous communication system. This smooths request peaks and troughs, eases backend processing pressure, improves resource utilization, and increases cost savings.
SDK Descriptions for Each Version
The following table describes the SDKs and feature support for each version of ApsaraMQ for RocketMQ. In the table, ✅ indicates that the feature is supported, and ❌ indicates that the feature is not supported.
In the following table, ✅ indicates that the feature is supported, and ❌ indicates that it is not.
Comparison 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 |
Usage recommendations | Use the 5.x gRPC SDK.
|
|
| |||
Sending ordinary, ordered, transaction, and scheduled messages | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Concurrent consumption | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Ordered consumption of messages | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Ordered consumption of messages concurrency optimization | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
Broadcasting consumption | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ |
Stream consumption (such as connecting to Flink) | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ |
Message trace | ✅ | ✅ | Supported in version 4.5.2 and later | ✅ | ✅ | ❌ |
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | |
✅ | Only 5.x series instances are supported | ❌ | ❌ | ❌ | ❌ | |
Feature compatibility between versions 4.x and 5.x
ApsaraMQ for RocketMQ 5.x instances are built on the production experience of large enterprise customers and have optimized features and behaviors for sending and receiving messages. As a result, parameter settings and feature behaviors may differ in some scenarios. These changes generally do not affect the main message flow. If you upgrade an existing 4.x instance to 5.x, you must assess the risks based on your business needs.
The following table describes the differences in features and behaviors:
Feature difference | Version 4.x | Version 5.x | Description |
Maximum duration for scheduled messages | 40 days |
For more information, see Quotas and limits. | Long scheduling durations can pose a stability risk to the system. Do not set the duration for too long. Use shorter durations to simulate business scenarios. For more information, see Scheduled and delayed messages. If you are migrating an existing 4.x instance and the maximum duration does not meet your requirements, submit a ticket for assistance. |
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 | Support | Use the Global Replicator feature. | Global Replicator supports open source, Alibaba Cloud 4.x, and Alibaba Cloud 5.x instance types. It provides cross-region and cross-instance synchronization for messages and consumption progress. |
Message type restriction | Not restricted | Strictly restricted | In version 5.x, message types are separated into topics for independent O&M and processing. The system strictly validates the sent message type against the message type defined for the topic. If the validation fails, the send request is rejected and a type mismatch exception is returned. For more information, see Topic behavior constraints. |
Purchase Restrictions
ApsaraMQ for RocketMQ 5.x instances are available for purchase by all users.
ApsaraMQ for RocketMQ 4.x instances are only available for purchase by existing users. We recommend that you upgrade your instance to version 5.x as soon as possible. To upgrade, you can submit a ticket for assistance.
4.x to 5.x Version Upgrade Description
Currently, you cannot directly upgrade 4.x instances to the 5.x version using an upgrade tool. To upgrade an existing instance to 5.x, you must purchase a 5.x instance and then gradually migrate your service traffic to the new instance, as shown in the following figure.
As shown in the preceding figure, you can quickly create metadata in the second step using the Topic and Group import/export features. For more information, see Topic Import/Export and Group Import/Export.
When migrating your business, you can use the following solution, which combines dual-read and dual-write operations with a phased release.
