This topic describes how to use the rocketmq-client-cpp binary package of Apache RocketMQ V4.x or V3.x to deploy and connect to Alibaba Cloud ApsaraMQ for RocketMQ. If you need to compile the source code, go to Apache Software Foundation to download the package.

Important
  • We recommend that you use the latest RocketMQ 5.x SDKs. These SDKs are fully compatible with the ApsaraMQ for RocketMQ 5.x brokers and provides more functions and enhanced features. For more information, see Release notes.
  • Alibaba Cloud only maintains RocketMQ 4.x, 3.x, and TCP client SDKs. We recommend that you use them only for existing business.

Description

You can download the Apache RocketMQ V4.x and V3.x SDKs for C++ from the following URL: rocketmq-client-cpp-2.1.0. We recommend that you download the latest version.

Install the C++ dynamic library

For information about how to install the C++ dynamic library, see Install the C++ dynamic library.

Use the SDK for C++ to send and receive messages

Sample code