C++ Kafka Client Library using Boost Asio
libkafka-asio
is a C++ header-only library, implementing the Kafka client
protocol. All Kafka APIs, including offset commit/fetch, are implemented:
For now it is missing support for Snappy/GZIP compression, but I plan to include this as well.
The library was tested on Linux (GCC 4.9, clang 3.5.1) and Windows (MSVC 10, 11, 12). There is a small (yet not complete) set of unit tests available under test
.
Add the lib
directory to your include paths and:
#include <libkafka_asio/libkafka_asio.h>
Please see the examples
directory for some examples on how to use the library.
Also consult the documentation: libkafka-asio Reference
libkafka-asio
depends on the Boost C++ libraries -- specially on Boost Asio. The following Boost sub-libraries are explicitly used in the project:
- boost asio
- boost bind
- boost crc
- boost foreach
- boost integer
- boost iterator
- boost optional
- boost smart ptr
- boost system
You need to link against boost_thread
and boost_system
.
So installing the boost library package on your distribution should do the trick (e.g. apt-get install libboost-dev
on Ubuntu, or pacman -S boost
on Arch).