Differences and compatibility between 4.x and 5.x versions

Updated at:

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

RocketMQ 5.x gRPC SDK

RocketMQ 5.x Remoting SDK

RocketMQ 4.x/3.x SDK

RocketMQ ONS TCP 1.x SDK

RocketMQ ONS TCP 2.x SDK

RocketMQ ONS HTTP SDK

Protocol

gRPC protocol v2

Remoting protocol

Remoting protocol

Remoting protocol

gRPC protocol v1

HTTP protocol

Accessible instances

5.x series instances

  • 5.x series instances

  • 4.x series instances

  • 5.x series instances

  • 4.x series instances

  • 5.x series instances

  • 4.x series instances

4.x series instances

4.x series instances

Usage recommendations

Use the 5.x gRPC SDK.

  • It offers comprehensive multi-language support.

  • All future features and optimizations will be supported on the 5.x gRPC SDK.

  • If certain 5.x gRPC SDK features do not meet your needs, consider using the 5.x Remoting SDK.

  • Clients from existing businesses using these versions can continue to operate normally.

  • 5.x series instances are compatible with these SDK versions.

  • Do not use clients from these versions. These SDK versions do not support future new features and optimizations.

  • They can only access 4.x series instances.

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

Producer and consumer client metrics data

Graceful shutdown

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

  • Instances on shared architecture support a maximum of 7 days.

  • Instances on dedicated architecture: Platinum Edition supports 40 days. Serverless dedicated instances can be customized.

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.

  • Version 5.x uses more standard ARN and policy definitions. To use version 5.x resources, existing users must grant permissions again according to the Version 5.x access policy.

  • The version 5.x data link no longer supports RAM authorization policies. It uses the open source RocketMQ ACL 2.0 permission system. For more information, see User identification.

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.迁移流程

Note

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.

Business migration