You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and the [Confluent Platform](https://www.confluent.io/product/compare/). The client is:
6
7
7
-
Features:
8
+
-**Reliable** - It's a wrapper around [librdkafka](https://github.com/edenhill/librdkafka) (provided automatically via binary wheels) which is widely deployed in a diverse set of production scenarios. It's tested using [the same set of system tests](https://github.com/confluentinc/confluent-kafka-python/tree/master/confluent_kafka/kafkatest) as the Java client [and more](https://github.com/confluentinc/confluent-kafka-python/tree/master/tests). It's supported by [Confluent](https://confluent.io).
8
9
9
-
-**High performance** - confluent-kafka-python is a lightweight wrapper around
10
-
[librdkafka](https://github.com/edenhill/librdkafka), a finely tuned C
11
-
client.
12
-
13
-
-**Reliability** - There are a lot of details to get right when writing an Apache Kafka
14
-
client. We get them right in one place (librdkafka) and leverage this work
15
-
across all of our clients (also [confluent-kafka-go](https://github.com/confluentinc/confluent-kafka-go)
16
-
and [confluent-kafka-dotnet](https://github.com/confluentinc/confluent-kafka-dotnet)).
17
-
18
-
-**Supported** - Commercial support is offered by
19
-
[Confluent](https://confluent.io/).
10
+
-**Performant** - Performance is a key design consideration. Maximum throughput is on par with the Java client for larger message sizes (where the overhead of the Python interpreter has less impact). Latency is on par with the Java client.
20
11
21
12
-**Future proof** - Confluent, founded by the
22
13
creators of Kafka, is building a [streaming platform](https://www.confluent.io/product/compare/)
23
14
with Apache Kafka at its core. It's high priority for us that client features keep
24
15
pace with core Apache Kafka and components of the [Confluent Platform](https://www.confluent.io/product/compare/).
25
16
26
-
The Python bindings provides a high-level Producer and Consumer with support
27
-
for the balanced consumer groups of Apache Kafka >= 0.9.
28
17
29
18
See the [API documentation](http://docs.confluent.io/current/clients/confluent-kafka-python/index.html) for more info.
30
19
@@ -34,7 +23,10 @@ See the [API documentation](http://docs.confluent.io/current/clients/confluent-k
34
23
Usage
35
24
=====
36
25
37
-
**Producer:**
26
+
Below are some examples of typical usage. For more examples, see the [examples](examples) directory or the [confluentinc/examples](https://github.com/confluentinc/examples/tree/master/clients/cloud/python) github repo for a [Confluent Cloud](https://www.confluent.io/confluent-cloud/) example.
27
+
28
+
29
+
**Producer**
38
30
39
31
```python
40
32
from confluent_kafka import Producer
@@ -65,7 +57,7 @@ p.flush()
65
57
```
66
58
67
59
68
-
**High-level Consumer:**
60
+
**High-level Consumer**
69
61
70
62
```python
71
63
from confluent_kafka import Consumer, KafkaError
@@ -177,28 +169,58 @@ while True:
177
169
c.close()
178
170
```
179
171
180
-
See the [examples](examples) directory for more examples, including [how to configure](examples/confluent_cloud.py) the python client for use with
**NOTE**: Requires `tox` (please install with `pip install tox`), several supported versions of Python on your path, and `librdkafka`[installed](tools/bootstrap-librdkafka.sh) into `tmp-build`.
291
-
292
-
293
-
**Integration tests:**
294
-
295
-
See [tests/README.md](tests/README.md) for instructions on how to run integration tests.
296
-
297
-
298
-
299
-
Generate Documentation
300
-
======================
301
-
Install sphinx and sphinx_rtd_theme packages:
302
-
303
-
$ pip install sphinx sphinx_rtd_theme
304
-
305
-
Build HTML docs:
306
-
307
-
$ make docs
308
-
309
-
or:
310
-
311
-
$ python setup.py build_sphinx
292
+
Developer Notes
293
+
===============
312
294
313
-
Documentation will be generated in `docs/_build/`.
295
+
Instructions on building and testing confluent-kafka-python can be found [here](DEVELOPER.md).
0 commit comments