1 概述
引用 GitHub 上的 RocketMQ-Client-CPP 介绍,内容如下:
RocketMQ-Client-CPP is the C/C++ client of Apache RocketMQ, a distributed messaging and streaming platform with low latency, high performance and reliability, trillion-level capacity and flexible scalability.
当前,RocketMQ-Client-CPP 支持如下特性:
- produce messages, including normal and delayed messages, synchronously or asynchronously
- consume messages, in cluster or broadcast model, concurrently or orderly
- c and c++ style API
- cross-platform, all features are supported on Windows, Linux and Mac OS
- automatically rebalanced, both in producing and consuming process
- reliability, any downtime broker or name server has no impact on the client
2 安装
2.1 准备环境
rocketmq-client-cpp 的安装是通过脚本 build.sh 实现的,不过在安装之前,需要确保开发环境中已经安装了下表所需的编译软件和库:
软件/库名 | 版本号 |
---|---|
操作系统 | CentOS Linux release 7.5.1804 |
gcc-c++(c++ compiler while need support C++11) | 4.8.5 |
cmake(build jsoncpp require it) | 2.8.12.2 |
automake(build libevent require it) | 1.13.4 |
autoconf(build libevent require it) | 2.69 |
libtool(build libevent require it) | 2.4.2 |
bzip2 |