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
* tidy up json serde (#1340)
* tidy up json serde
* to_dict doc tweaks
* serializer text tweak
* produces -> outputs
* address review comments
* minor tweak
* tidy up protobuf serde (#1337)
* tidy up protobuf serde
* tweak sr explanation text
* tweak SerializeError text
* changes following review of JSON Schema PR
* Fixed failing test cases by changing the function names (#1419)
* tidy up avro serde + additional polish (#1413)
* tidy up avro serde
* SerializingProducer & DeserializingConsumer polish + other tweaks
* Deemphasise SerializingProducer and DeserializingConsumer
* Removing use of SerializingProducer and DeserializingConsumer
* Tweak examples readme
* CI error fixes
* Additional CI error fixes
* Additional CI error fix
* Fix examples
* fix flake8 error
* A bit of README.md polish (#1424)
* A bit of README.md polish
* additional tweaks
* updates based on review feedback
Co-authored-by: Pranav Rathi <[email protected]>
and the [Confluent Platform](https://www.confluent.io/product/compare/). The client is:
6
+
and [Confluent Platform](https://www.confluent.io/product/compare/). The client is:
7
7
8
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/src/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).
9
9
@@ -15,23 +15,25 @@ with Apache Kafka at its core. It's high priority for us that client features ke
15
15
pace with core Apache Kafka and components of the [Confluent Platform](https://www.confluent.io/product/compare/).
16
16
17
17
18
-
See the [API documentation](http://docs.confluent.io/current/clients/confluent-kafka-python/index.html) for more info.
18
+
## Usage
19
19
20
20
For a step-by-step guide on using the client see [Getting Started with Apache Kafka and Python](https://developer.confluent.io/get-started/python/).
21
21
22
+
Aditional examples can be found in the [examples](examples) directory or the [confluentinc/examples](https://github.com/confluentinc/examples/tree/master/clients/cloud/python) github repo, which include demonstration of:
23
+
- Exactly once data processing using the transactional API.
24
+
- Integration with asyncio.
25
+
- (De)serializing Protobuf, JSON, and Avro data with Confluent Schema Registry integration.
Also refer to the [API documentation](http://docs.confluent.io/current/clients/confluent-kafka-python/index.html).
25
29
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.
30
+
Finally, the [tests](tests) are useful as a reference for example usage.
27
31
28
-
29
-
**Producer**
32
+
### Basic Producer Example
30
33
31
34
```python
32
35
from confluent_kafka import Producer
33
36
34
-
35
37
p = Producer({'bootstrap.servers': 'mybroker1,mybroker2'})
36
38
37
39
defdelivery_report(err, msg):
@@ -46,23 +48,26 @@ for data in some_data_source:
46
48
# Trigger any available delivery report callbacks from previous produce() calls
47
49
p.poll(0)
48
50
49
-
# Asynchronously produce a message, the delivery report callback
50
-
#will be triggered from poll() above, or flush() below, when the message has
51
-
# been successfully delivered or failed permanently.
51
+
# Asynchronously produce a message. The delivery report callback will
52
+
# be triggered from the call to poll() above, or flush() below, when the
53
+
#message has been successfully delivered or failed permanently.
KAFKA is a registered trademark of The Apache Software Foundation and has been licensed for use
287
190
by confluent-kafka-python. confluent-kafka-python has no affiliation with and is not endorsed by
288
191
The Apache Software Foundation.
289
192
290
-
Developer Notes
291
-
===============
193
+
194
+
## Developer Notes
292
195
293
196
Instructions on building and testing confluent-kafka-python can be found [here](DEVELOPER.md).
294
197
295
-
Confluent Cloud
296
-
===============
198
+
199
+
## Confluent Cloud
297
200
298
201
For a step-by-step guide on using the Python client with Confluent Cloud see [Getting Started with Apache Kafka and Python](https://developer.confluent.io/get-started/python/) on [Confluent Developer](https://developer.confluent.io/).
0 commit comments