1,Git clone
git clone https://github.com/edenhill/librdkafka.git
2,cd librdkafka/
3,./configure
4,make
5,sudo make install
最后鏈接lib庫:
-lrdkafka++
other
Link your program with -lrdkafka -lz -lpthread -lrt
.
參考連接:https://github.com/edenhill/librdkafka