cppkafka使c++用kafka生产和消费消息变得简单。cppkafka是 rdkafka的c++封装。
github地址:https://github.com/mfontanini/cppkafka
In order to compile cppkafka you need: librdkafka >= 0.9.4 CMake A compiler with good C++11 support (e.g. gcc >= 4.8). This was tested successfully on g++ 4.8.3. The boost library.
Now, in order to build, just run: mkdir build cd build cmake<OPTIONS>.. make
此时,就可以直接运行cppkafka/example目录下的例子,看是否可以成功消费生产消息了。