All Products
Search
Document Center

ApsaraMQ for RocketMQ:Overview

Last Updated:Feb 07, 2024

ApsaraMQ for RocketMQ supports TCP client SDKs and HTTP client SDKs for multiple programming languages. This topic describes the differences between TCP client SDKs and HTTP client SDKs. This topic also describes the usage notes for TCP client SDKs and HTTP client SDKs.

Compatibility description

The following table describes the compatibility between ApsaraMQ for RocketMQ broker versions and client SDK versions.

Instance version

Client version

Compatibility

Limit

ApsaraMQ for RocketMQ 5.x instance

Apache RocketMQ 5.x SDKs

Compatible

All features of ApsaraMQ for RocketMQ 5.x instances are supported.

Apache RocketMQ 4.x and 3.x SDKs

Compatible

The messaging feature is supported. Message trace data and specific metrics cannot be displayed.

Apache RocketMQ TCP client 1.x SDKs

Important

ApsaraMQ for RocketMQ 5.x instances cannot be accessed by using Apache RocketMQ TCP client 2.x SDKs.

Compatible

The messaging feature is supported. Message trace data and specific metrics cannot be displayed.

ApsaraMQ for RocketMQ HTTP client SDKs

Incompatible

ApsaraMQ for RocketMQ 5.x SDKs do not support the HTTP protocol.

ApsaraMQ for RocketMQ 4.x instance

ApsaraMQ for RocketMQ 5.x SDKs

Incompatible

You cannot access ApsaraMQ for RocketMQ 4.x instances by using SDKs that correspond to ApsaraMQ for RocketMQ 5.x instances.

Apache RocketMQ 4.x and 3.x SDKs

Compatible

All features of ApsaraMQ for RocketMQ 4.x instances are supported.

Apache RocketMQ TCP client 1.x and 2.x SDKs

Compatible

Apache RocketMQ HTTP client SDKs

Compatible

TCP

Important

Open source SDKs are used only when you migrate data from open source Apache RocketMQ to ApsaraMQ for RocketMQ but do not want to modify the code. In other scenarios, we recommend that you use Commercial Edition SDKs provided by ApsaraMQ for RocketMQ. Compared with open source SDKs, Commercial Edition SDKs provide more features and higher stability.

HTTP

Comparison between TCP client SDKs and HTTP client SDKs

TCP client SDKs and HTTP client SDKs provide different features. We recommend that you select a protocol type based on your business requirements.

Item

TCP client SDK

HTTP client SDK

Suggestions

TCP client SDKs are recommended as the preferred option. The following items describe the benefits of TCP client SDKs:

  • Applicable to scenarios in which high concurrency is required due to excellent transmission performance.

  • Provide more messaging features and iterate at a higher frequency compared with HTTP client SDKs.

  • Provide more observability metrics and more comprehensive message accumulation and reset features compared with HTTP client SDKs.

HTTP client SDKs are recommended as an alternative option. The following items describe the benefits of HTTP client SDKs:

  • Can be used in scenarios in which a programming language that is not supported by TCP client SDKs is used.

  • Applicable to simple scenarios due to lightweight access and few features.

Normal messages

支持

支持

Ordered messages

支持

支持

Scheduled messages and delayed messages

支持

支持

Transactional messages

支持

支持

Push consumers

支持

不支持

Pull consumers

支持

不支持

Batch consumption

支持

不支持

Broadcasting consumption

支持

不支持

Clustering consumption

支持

支持

Message retry

支持

支持

Query message traces

支持

支持

Dead-letter queues

支持

支持

Reset consumer offsets

支持

不支持

Usage notes

  • Each type of endpoint can be used only by clients of the same protocol type. For example, if you want to use a TCP client SDK to send and receive messages, you must use the TCP endpoint of your ApsaraMQ for RocketMQ instance to access the ApsaraMQ for RocketMQ broker.

  • ApsaraMQ for RocketMQ allows you to send and receive messages by using groups that are created for HTTP clients and TCP clients. You must create different groups for clients of different types. For example, if you want to use a TCP client SDK to send and receive messages, you must use a group that is created only for TCP clients.

  • Messages can be transmitted between TCP clients and HTTP clients. Message information such as attributes, content, tags, and keys must comply with Extensible Markup Language (XML) rules because HTTP uses XML serialization. Otherwise, messages may fail to be sent or consumed.

    You can use Base64 to encode or decode messages that do not comply with XML rules.

    Note

    For more information about XML rules, see Extensible Markup Language (XML) 1.0 (Fifth Edition). You can also use the third-party tool xml_validator to check whether your messages comply with XML rules based on your business requirements. For more information about xml_validator, see XML Validator.

  • Public and private endpoints for TCP and HTTP clients are provided in all regions. In production environments, we recommend that you access ApsaraMQ for RocketMQ in virtual private clouds (VPCs). If you want to access ApsaraMQ for RocketMQ across regions, from on-premises data centers, or over the Internet while Cloud Enterprise Network (CEN) is unavailable, you can use public endpoints to access ApsaraMQ for RocketMQ instances. If you use public endpoints to access ApsaraMQ for RocketMQ instances, you are charged for outbound Internet traffic. For more information, see Billing of Internet traffic.