C C++ Shell Python CMake Makefile Other
Switch branches/tags
Clone or download
edenhill Remove incremental from AdminOptions
There is still no concensus in AK how to do incremental configuration
updates so instead of us providing a no-op interface now that might
not match the future Java API, we back out the public portions
but keep the internal implementation for later re-use.
Latest commit 44242a4 Jul 18, 2018
Failed to load latest commit information.
.github Issue template update Dec 11, 2017
examples rdkafka_performance: simulate consumer processing time with -r <rate> Jul 15, 2018
mklove Added `make uninstall` Jun 19, 2018
packaging nuget: Include centos7 build (requires libsasl2 and libssl) Jul 15, 2018
src-cpp Version v0.11.5 Jul 4, 2018
src Remove incremental from AdminOptions Jul 18, 2018
tests Remove incremental from AdminOptions Jul 18, 2018
win32 Fix win32 compilation errors and warnings Jul 15, 2018
.appveyor.yml appveyor: reset working directory after tests, again Jun 7, 2018
.dir-locals.el emacs default compile command Jan 7, 2017
.doozer.json Add mips build so we can test builds on big endian systems Nov 12, 2017
.gitignore Add msvcr120 for nuget packaging Oct 5, 2017
.travis.yml rpm: Run mock in centos7 docker container Jun 18, 2018
CMakeLists.txt cmake build improve on windows (#1638 by @raulbocanegra) Jan 22, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Oct 18, 2017
CONFIGURATION.md added `compresion.level' configuration option, which allows fine-tuni… Jun 18, 2018
CONTRIBUTING.md CONTRIBUTING: 8 space indent, not 4 Nov 15, 2016
Doxyfile Move statistics from wiki to STATISTICS.md May 31, 2018
INTRODUCTION.md Don't log connection close for idle connections Jun 15, 2018
LICENSE LICENSE date update May 31, 2018
LICENSE.crc32c Import of crc32c from http://stackoverflow.com/a/17646775/1821055 May 31, 2017
LICENSE.hdrhistogram Ported Coda Hale's Golang HdrHistogram to C May 31, 2018
LICENSE.lz4 Add lz4/lib sources for in-tree building May 10, 2017
LICENSE.murmur2 Refactor murmur2 code and add more unit tests (unaligned access) Jan 3, 2018
LICENSE.pycrc Extracted rdkafka from librd to its own library. Sep 19, 2012
LICENSE.queue Native Win32 (VS) support (take one) Mar 24, 2015
LICENSE.regexp regexp import from ccxvii/minilibs sha 875c33568b5a4aa4fb3dd0c52ea98f… Sep 28, 2016
LICENSE.snappy snappy-c upstream update: Clean import of andikleen/snappy-c@8015f2d Nov 5, 2015
LICENSE.tinycthread clean tinycthread import tinycthread.c at ce82058b05180ce, tinycthrea… Mar 23, 2015
LICENSE.wingetopt clean wingetopt import of wingetopt.c and wingetopt.h at version 281d… Mar 23, 2015
LICENSES.txt LICENSE date update May 31, 2018
Makefile Added `make uninstall` Jun 19, 2018
README.md Fix compilation error when ZLIB is not available Jul 5, 2018
README.win32 Build with system liblz4 if available, else fall back on built-in lz4 May 10, 2017
STATISTICS.md Calculate consumer_lag using hi_offset=MAX(app_offset,committed_offset) Jul 17, 2018
configure mklove: fix ./configure --reconfigure Nov 24, 2016
configure.librdkafka Stats tests: use rapidjson (if avail) to validate JSON by schema May 31, 2018
dev-conf.sh dev-conf: reorg -fsanitize Jun 5, 2018
lds-gen.py Dont include static functions in linker script (issue #662) May 18, 2016
mainpage.doxy Doxygenification: C API, C++ API stub, INTRODUCTION, CONFIGURATION an… Dec 8, 2015


librdkafka - the Apache Kafka C/C++ client library

Copyright (c) 2012-2018, Magnus Edenhill.


Gitter chat Build status

librdkafka is a C library implementation of the Apache Kafka protocol, containing both Producer and Consumer support. It was designed with message delivery reliability and high performance in mind, current figures exceed 1 million msgs/second for the producer and 3 million msgs/second for the consumer.

librdkafka is licensed under the 2-clause BSD license.

For an introduction to the performance and usage of librdkafka, see INTRODUCTION.md

See the wiki for a FAQ.

NOTE: The master branch is actively developed, use latest release for production use.


  • High-level producer
  • High-level balanced KafkaConsumer (requires broker >= 0.9)
  • Simple (legacy) consumer
  • Compression: snappy, gzip, lz4
  • SSL support
  • SASL (GSSAPI/Kerberos/SSPI, PLAIN, SCRAM) support
  • Broker version support: >=0.8 (see Broker version compatibility)
  • Stable C & C++ APIs (ABI safety guaranteed for C)
  • Statistics metrics
  • Debian package: librdkafka1 and librdkafka-dev in Debian and Ubuntu
  • RPM package: librdkafka and librdkafka-devel
  • Gentoo package: dev-libs/librdkafka
  • Portable: runs on Linux, OSX, Win32, Solaris, FreeBSD, AIX, ...

Language bindings

Users of librdkafka



The GNU toolchain
GNU make
zlib-dev (optional, for gzip compression support)
libssl-dev (optional, for SSL and SASL SCRAM support)
libsasl2-dev (optional, for SASL GSSAPI support)



  sudo make install

NOTE: See README.win32 for instructions how to build on Windows with Microsoft Visual Studio.

NOTE: See CMake instructions for experimental CMake build (unsupported).

Usage in code

See examples/rdkafka_example.c for an example producer and consumer.

Link your program with -lrdkafka -lz -lpthread -lrt.


The public APIs are documented in their respective header files:

To generate Doxygen documents for the API, type:

make docs

Configuration properties are documented in CONFIGURATION.md

For a librdkafka introduction, see INTRODUCTION.md


See the examples/sub-directory.


See the tests/sub-directory.


File bug reports, feature requests and questions using GitHub Issues

Questions and discussions are also welcome on irc.freenode.org, #apache-kafka, nickname Snaps.

Commercial support

Commercial support is available from Edenhill services