Message Queue for Apache RocketMQ provides multi-language client SDKs for sending and subscribing to different types of messages over TCP and HTTP. This topic describes how to use the multi-language SDKs to send and subscribe to messages over TCP and HTTP.

Background information

Message Queue for Apache RocketMQ provides four message types. For more information, see Overview. In this topic, normal messages are used in the example. You can use the preceding procedure to create a topic for normal messages. The topic that you create cannot be used to send or receive other types of messages. Each topic can send and receive messages of a specified type.


The following figure shows the procedure based on the protocol that you select.


Usage notes

  • The TCP client SDK and the HTTP client SDK provided by Message Queue for Apache RocketMQ are different from each other. Therefore, the group IDs of HTTP-based instances cannot use the TCP client SDK, whereas the group IDs of TCP-based instances cannot use the HTTP client SDK.
  • If a Message Queue for Apache RocketMQ instance has a TCP endpoint and an HTTP endpoint, you must separately obtain the TCP SDK and the HTTP SDK to use their corresponding endpoints. You cannot use the HTTP endpoint for the TCP SDK or use the TCP endpoint for the HTTP SDK.
  • Public endpoints are available for TCP clients only in the Internet region. In other regions, only internal endpoints are available. Public and internal endpoints are available for HTTP clients in all regions.
  • If your application uses Message Queue for Apache RocketMQ across regions, we recommend that you use HTTP.
  • More features will be developed for the HTTP SDK to match those of the TCP SDK. For more information about how to use the HTTP SDK, see Release notes.

What to do next