All Products
Search
Document Center

ApsaraMQ for RocketMQ:C++ SDK overview (Apache RocketMQ 4.x/3.x)

Last Updated:Mar 11, 2026

The rocketmq-client-cpp binary package lets you send and receive messages on ApsaraMQ for RocketMQ from C++ applications. This page covers the Apache RocketMQ 4.x and 3.x C++ SDK.

Important
  • We recommend that you use the latest RocketMQ 5.x SDKs. These SDKs are fully compatible with ApsaraMQ for RocketMQ 5.x brokers and provides more functions and enhanced features. For more information, see Version Guide.

  • Alibaba Cloud only maintains RocketMQ 4.x, 3.x, and TCP client SDKs. We recommend that you use them only for existing business.

Get started

Step 1: Download the SDK

Download the pre-built binary package from GitHub:

To compile from source, download the code from the Apache Software Foundation.

Step 2: Install the C++ dynamic library

For platform-specific instructions, see Install the C++ dynamic library.

Step 3: Send and receive messages

For complete examples of producing and consuming messages, see Sample code.

See also