Open
Description
Would it make sense for the consumers and producers to implement the context management protocol?
So that one could write:
from kafka import KafkaProducer
with KafkaProducer(bootstrap_servers='localhost:1234') as producer:
for _ in range(100):
producer.send('foobar', b'some_message_bytes')