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.
Open source SDKs are used only when you migrate data from open source Apache RocketMQ to Message Queue for Apache RocketMQ but do not want to modify the code. In other scenarios, we recommend that you use SDKs for commercial use provided by ApsaraMQ for RocketMQ. The SDKs for commercial use provide more features and higher stability than open source SDKs.
Commercial editions of TCP client SDKs (ONS 1.x and 2.x SDKs)
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.