1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
//! # rust-rdkafka //! Kafka client library for Rust based on [librdkafka]. //! //! ## The library //! This library aims to provide a safe interface to librdkafka. //! It currently exports some of the funcionalities provided by the producer and consumer //! of librdkafka 0.9.2. //! //! Producers and consumers can be accessed and polled directly, or alternatively //! a [futures]-based interface can be used: //! //! * A consumer will return a [`stream`] of messages, as they are received from Kafka. //! * A producer will return a [`future`] that will eventually contain the delivery //! status of the message. //! //! [librdkafka]: https://github.com/edenhill/librdkafka //! [futures]: https://github.com/alexcrichton/futures-rs //! [`future`]: https://docs.rs/futures/0.1.3/futures/trait.Future.html //! [`stream`]: https://docs.rs/futures/0.1.3/futures/stream/trait.Stream.html //! //! *Warning*: this library is still at an early development stage, the API is very likely //! to change and it shouldn't be considered production ready. //! //! ## Installation //! //! Add this to your `Cargo.toml`: //! //! ```toml //! [dependencies] //! rdkafka = "^0.1.0" //! ``` //! //! This crate will compile librdkafka from sources and link it statically in your //! executable. To compile librdkafka you'll need: //! //! * the GNU toolchain //! * GNU `make` //! * `pthreads` //! * `zlib`: optional, included by default (feature: `zlib`). //! * `libssl-dev`: optional, *not* included by default (feature: `ssl`). //! * `libsasl2-dev`: optional, *not* included by default (feature: `sasl`). //! //! To enable ssl and sasl, use the `features` field in `Cargo.toml`. Example: //! //! ```toml //! [dependencies.rdkafka] //! version = "0.1.0" //! features = ["ssl", "sasl"] //! ``` //! //! ## Compiling from sources //! //! To compile from sources, you'll have to update the submodule containing librdkafka: //! //! ```bash //! git submodule update --init //! ``` //! //! and then compile using `cargo`, selecting the features that you want. Example: //! //! ```bash //! cargo build --features "ssl sasl" //! ``` //! //! ## Examples //! //! You can find examples in the `examples` folder. To run them: //! //! ```bash //! cargo run --example <example_name> -- <example_args> //! ``` //! #[macro_use] extern crate log; pub mod client; pub mod config; pub mod consumer; pub mod error; pub mod message; pub mod producer; pub mod util;