• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/H11-Oct-2021-3319

debian/H11-Oct-2021-485420

examples/H03-May-2022-9,1185,948

mklove/H11-Oct-2021-3,9272,368

packaging/H11-Oct-2021-4,0732,833

src/H03-May-2022-124,48673,116

src-cpp/H03-May-2022-6,8972,989

tests/H03-May-2022-50,90732,115

win32/H11-Oct-2021-2,5192,140

.appveyor.ymlH A D11-Oct-20212.7 KiB10687

.dir-locals.elH A D11-Oct-2021305 119

.doozer.jsonH A D11-Oct-20212.3 KiB115106

.gdbmacrosH A D11-Oct-2021516 2017

.gitignoreH A D11-Oct-2021265 3332

.travis.ymlH A D11-Oct-20216.4 KiB163145

CHANGELOG.mdH A D11-Oct-202136.3 KiB777610

CODE_OF_CONDUCT.mdH A D11-Oct-20213.1 KiB4728

CONFIGURATION.mdH A D11-Oct-202152 KiB175169

CONTRIBUTING.mdH A D11-Oct-20218.3 KiB299190

DoxyfileH A D11-Oct-2021101.4 KiB2,3761,834

INTRODUCTION.mdH A D11-Oct-2021103.1 KiB2,0181,533

LICENSEH A D11-Oct-20211.3 KiB2621

LICENSE.crc32cH A D11-Oct-20211.1 KiB2923

LICENSE.fnv1aH A D11-Oct-2021695 1913

LICENSE.hdrhistogramH A D11-Oct-20211.3 KiB2821

LICENSE.lz4H A D11-Oct-20211.4 KiB2721

LICENSE.murmur2H A D11-Oct-20211.3 KiB2620

LICENSE.pycrcH A D11-Oct-20211.2 KiB2419

LICENSE.queueH A D11-Oct-20211.6 KiB3130

LICENSE.regexpH A D11-Oct-2021326 64

LICENSE.snappyH A D11-Oct-20211.9 KiB3730

LICENSE.tinycthreadH A D11-Oct-20211 KiB2719

LICENSE.wingetoptH A D11-Oct-20212.5 KiB5048

MakefileH A D11-Oct-20213 KiB10877

README.mdH A D11-Oct-20218.1 KiB195136

README.win32H A D11-Oct-2021912 2720

STATISTICS.mdH A D11-Oct-202120.4 KiB622583

configureH A D11-Oct-20214.6 KiB215133

configure.selfH A D11-Oct-20219.9 KiB326228

dev-conf.shH A D11-Oct-20213.2 KiB12449

lds-gen.pyH A D11-Oct-20212.3 KiB6925

mainpage.doxyH A D11-Oct-20211.3 KiB4139

vcpkg.jsonH A D11-Oct-2021400 2019

README.md

1librdkafka - the Apache Kafka C/C++ client library
2==================================================
3
4Copyright (c) 2012-2020, [Magnus Edenhill](http://www.edenhill.se/).
5
6[https://github.com/edenhill/librdkafka](https://github.com/edenhill/librdkafka)
7
8**librdkafka** is a C library implementation of the
9[Apache Kafka](https://kafka.apache.org/) protocol, providing Producer, Consumer
10and Admin clients. It was designed with message delivery reliability
11and high performance in mind, current figures exceed 1 million msgs/second for
12the producer and 3 million msgs/second for the consumer.
13
14**librdkafka** is licensed under the 2-clause BSD license.
15
16KAFKA is a registered trademark of The Apache Software Foundation and
17has been licensed for use by librdkafka. librdkafka has no
18affiliation with and is not endorsed by The Apache Software Foundation.
19
20
21# Features #
22  * Full Exactly-Once-Semantics (EOS) support
23  * High-level producer, including Idempotent and Transactional producers
24  * High-level balanced KafkaConsumer (requires broker >= 0.9)
25  * Simple (legacy) consumer
26  * Admin client
27  * Compression: snappy, gzip, lz4, zstd
28  * [SSL](https://github.com/edenhill/librdkafka/wiki/Using-SSL-with-librdkafka) support
29  * [SASL](https://github.com/edenhill/librdkafka/wiki/Using-SASL-with-librdkafka) (GSSAPI/Kerberos/SSPI, PLAIN, SCRAM, OAUTHBEARER) support
30  * Full list of [supported KIPs](INTRODUCTION.md#supported-kips)
31  * Broker version support: >=0.8 (see [Broker version compatibility](INTRODUCTION.md#broker-version-compatibility))
32  * Guaranteed API stability for C & C++ APIs (ABI safety guaranteed for C)
33  * [Statistics](STATISTICS.md) metrics
34  * Debian package: librdkafka1 and librdkafka-dev in Debian and Ubuntu
35  * RPM package: librdkafka and librdkafka-devel
36  * Gentoo package: dev-libs/librdkafka
37  * Portable: runs on Linux, MacOS X, Windows, Solaris, FreeBSD, AIX, ...
38
39# Documentation
40
41 * Public API in [C header](src/rdkafka.h) and [C++ header](src-cpp/rdkafkacpp.h).
42 * Introduction and manual in [INTRODUCTION.md](https://github.com/edenhill/librdkafka/blob/master/INTRODUCTION.md).
43 * Configuration properties in
44[CONFIGURATION.md](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md).
45 * Statistics metrics in [STATISTICS.md](https://github.com/edenhill/librdkafka/blob/master/STATISTICS.md).
46 * [Frequently asked questions](https://github.com/edenhill/librdkafka/wiki).
47
48**NOTE**: The `master` branch is actively developed, use latest [release](https://github.com/edenhill/librdkafka/releases) for production use.
49
50
51# Installation
52
53## Installing prebuilt packages
54
55On Mac OSX, install librdkafka with homebrew:
56
57```bash
58$ brew install librdkafka
59```
60
61On Debian and Ubuntu, install librdkafka from the Confluent APT repositories,
62see instructions [here](https://docs.confluent.io/current/installation/installing_cp/deb-ubuntu.html#get-the-software) and then install librdkafka:
63
64 ```bash
65 $ apt install librdkafka-dev
66 ```
67
68On RedHat, CentOS, Fedora, install librdkafka from the Confluent YUM repositories,
69instructions [here](https://docs.confluent.io/current/installation/installing_cp/rhel-centos.html#get-the-software) and then install librdkafka:
70
71```bash
72$ yum install librdkafka-devel
73```
74
75On Windows, reference [librdkafka.redist](https://www.nuget.org/packages/librdkafka.redist/) NuGet package in your Visual Studio project.
76
77
78For other platforms, follow the source building instructions below.
79
80
81## Installing librdkafka using vcpkg
82
83You can download and install librdkafka using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
84
85```bash
86# Install vcpkg if not already installed
87$ git clone https://github.com/Microsoft/vcpkg.git
88$ cd vcpkg
89$ ./bootstrap-vcpkg.sh
90$ ./vcpkg integrate install
91
92# Install librdkafka
93$ vcpkg install librdkafka
94```
95
96The librdkafka package in vcpkg is kept up to date by Microsoft team members and community contributors.
97If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
98
99
100## Build from source
101
102### Requirements
103	The GNU toolchain
104	GNU make
105   	pthreads
106	zlib-dev (optional, for gzip compression support)
107	libssl-dev (optional, for SSL and SASL SCRAM support)
108	libsasl2-dev (optional, for SASL GSSAPI support)
109	libzstd-dev (optional, for ZStd compression support)
110
111**NOTE**: Static linking of ZStd (requires zstd >= 1.2.1) in the producer
112          enables encoding the original size in the compression frame header,
113          which will speed up the consumer.
114          Use `STATIC_LIB_libzstd=/path/to/libzstd.a ./configure --enable-static`
115          to enable static ZStd linking.
116          MacOSX example:
117          `STATIC_LIB_libzstd=$(brew ls -v zstd | grep libzstd.a$) ./configure --enable-static`
118
119
120### Building
121
122      ./configure
123      # Or, to automatically install dependencies using the system's package manager:
124      # ./configure --install-deps
125      # Or, build dependencies from source:
126      # ./configure --install-deps --source-deps-only
127
128      make
129      sudo make install
130
131
132**NOTE**: See [README.win32](README.win32) for instructions how to build
133          on Windows with Microsoft Visual Studio.
134
135**NOTE**: See [CMake instructions](packaging/cmake/README.md) for experimental
136          CMake build (unsupported).
137
138
139## Usage in code
140
1411. Refer to the [examples directory](examples/) for code using:
142
143* Producers: basic producers, idempotent producers, transactional producers.
144* Consumers: basic consumers, reading batches of messages.
145* Performance and latency testing tools.
146
1472. Refer to the [examples GitHub repo](https://github.com/confluentinc/examples/tree/master/clients/cloud/c) for code connecting to a cloud streaming data service based on Apache Kafka
148
1493. Link your program with `-lrdkafka` (C) or `-lrdkafka++` (C++).
150
151
152## Commercial support
153
154Commercial support is available from [Confluent Inc](https://www.confluent.io/)
155
156
157## Community support
158
159**Only the [last official release](https://github.com/edenhill/librdkafka/releases) is supported for community members.**
160
161File bug reports, feature requests and questions using
162[GitHub Issues](https://github.com/edenhill/librdkafka/issues)
163
164Questions and discussions are also welcome on the [Confluent Community slack](https://launchpass.com/confluentcommunity) #clients channel.
165
166
167# Language bindings #
168
169  * C#/.NET: [confluent-kafka-dotnet](https://github.com/confluentinc/confluent-kafka-dotnet) (based on [rdkafka-dotnet](https://github.com/ah-/rdkafka-dotnet))
170  * C++: [cppkafka](https://github.com/mfontanini/cppkafka)
171  * C++: [modern-cpp-kafka](https://github.com/Morgan-Stanley/modern-cpp-kafka)
172  * Common Lisp: [cl-rdkafka](https://github.com/SahilKang/cl-rdkafka)
173  * D (C-like): [librdkafka](https://github.com/DlangApache/librdkafka/)
174  * D (C++-like): [librdkafkad](https://github.com/tamediadigital/librdkafka-d)
175  * Erlang: [erlkaf](https://github.com/silviucpp/erlkaf)
176  * Go: [confluent-kafka-go](https://github.com/confluentinc/confluent-kafka-go)
177  * Haskell (kafka, conduit, avro, schema registry): [hw-kafka](https://github.com/haskell-works/hw-kafka)
178  * Lua: [luardkafka](https://github.com/mistsv/luardkafka)
179  * Node.js: [node-rdkafka](https://github.com/Blizzard/node-rdkafka)
180  * OCaml: [ocaml-kafka](https://github.com/didier-wenzek/ocaml-kafka)
181  * Perl: [Net::Kafka](https://github.com/bookingcom/perl-Net-Kafka)
182  * PHP: [php-rdkafka](https://github.com/arnaud-lb/php-rdkafka)
183  * PHP: [php-simple-kafka-client](https://github.com/php-kafka/php-simple-kafka-client)
184  * Python: [confluent-kafka-python](https://github.com/confluentinc/confluent-kafka-python)
185  * Python: [PyKafka](https://github.com/Parsely/pykafka)
186  * Ruby: [Hermann](https://github.com/reiseburo/hermann)
187  * Ruby: [rdkafka-ruby](https://github.com/appsignal/rdkafka-ruby)
188  * Rust: [rust-rdkafka](https://github.com/fede1024/rust-rdkafka)
189  * Tcl: [KafkaTcl](https://github.com/flightaware/kafkatcl)
190  * Shell: [kafkacat](https://github.com/edenhill/kafkacat) - Apache Kafka command line tool
191  * Swift: [Perfect-Kafka](https://github.com/PerfectlySoft/Perfect-Kafka)
192
193
194See [Powered by librdkafka](https://github.com/edenhill/librdkafka/wiki/Powered-by-librdkafka) for an incomplete list of librdkafka users.
195

README.win32

1
2Native win32 build instructions using Microsoft Visual Studio 2015 (MSVC).
3
4Requirements:
5 * zlib is installed automatically from NuGet,
6   but probably requires the NuGet VS extension.
7 * OpenSSL-win32 must be installed in C:\OpenSSL-win32 and C:\OpenSSL-Win64
8   depending on your architecture.
9   Download and install the latest v1.0.2 non-light package from:
10   https://slproweb.com/products/Win32OpenSSL.html
11   (This would be using NuGet too but the current
12    OpenSSL packages are outdated and with broken
13    dependencies, so no luck)
14
15The Visual Studio solution file for librdkafka resides in win32/librdkafka.sln
16
17Artifacts:
18 - C library
19 - C++ library
20 - rdkafka_example, rdkafka_performance
21 - tests
22
23
24If you build librdkafka with an external tool (ie CMake) you can get rid of the
25__declspec(dllexport) / __declspec(dllimport) decorations by adding a define
26-DLIBRDKAFKA_STATICLIB to your CFLAGS
27