Kafka C++ SDK编译记录

1、安装rdkafka套件

sudo yum install librdkafka-devel

2、下载cppkafka源码

git clone https://github.com/mfontanini/cppkafka

3、编译cppkafka源码

cd cppkafka
mkdir build
cd build
# 依赖boost option库,需要安装boost,由于之前安装rocketmq sdk时依赖boost
# 所以此处用同一个版本的boost
 cmake .. -DBOOST_ROOT=/home/user/rocketmq-client-cpp/bin/include/
make -j4
sudo make install

4、安装路径

/usr/local/include/cppkafka/
/usr/local/lib/cmake/CppKafka/FindRdKafka.cmake
/usr/local/lib64/libcppkafka.so.0.3.1

你可能感兴趣的:(Kafka C++ SDK编译记录)