Message Queue for Apache RocketMQ provides the TCP client SDK and HTTP client SDK for multiple programming languages. You can use the SDKs to send and subscribe to different types of messages. This topic describes the procedure and notes for using the TCP client SDK and HTTP client SDK for multiple programming languages to send and subscribe to normal messages.

Background information

Message Queue for Apache RocketMQ provides four types of messages. For more information, see Overview. In this topic, normal messages are used as an example. The topic that you create by following the procedure in this topic cannot be used to send or subscribe to other types of messages. Each topic can be used to send and subscribe to messages of a specific type.

Procedure

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

quick-start-process

Usage notes

  • Message Queue for Apache RocketMQ provides different SDKs for different protocols that include TCP and HTTP used to send and subscribe to messages. You cannot specify the same group ID in the code of the TCP client SDK and the code of the HTTP client SDK at the same time.
  • A Message Queue for Apache RocketMQ instance has a TCP endpoint and an HTTP endpoint. If you send and subscribe to messages over TCP, you must use the TCP client SDK and the TCP endpoint. If you send and subscribe to messages over HTTP, you must use the HTTP client SDK and the HTTP endpoint.
  • 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 client SDK to align with those of the TCP client SDK. For more information about how to use the HTTP client SDK, see Release notes.

What to do next