Overview
confluent-kafka 2.4, released on April 15, 2024, adds Python 3.12 support.
Main Features
Python 3.12 support
Bindings are compiled for Python 3.12 with the necessary compatibility fixes.
python
from confluent_kafka import Producer
producer = Producer({'bootstrap.servers': 'localhost:9092'})
def delivery_report(err, msg):
if err:
print(f'Error: {err}')
else:
print(f'Message delivered: {msg.topic()}')
producer.produce('my-topic', value='hello',
callback=delivery_report)
producer.flush()
