aiokafka icon indicating copy to clipboard operation
aiokafka copied to clipboard

Inconsistent producer start/stop

Open valq7711 opened this issue 2 years ago • 0 comments

As there is self._closed = False in __init__, then it requires to call await producer.stop() even if it is not started.

producer = aiokafka.AIOKafkaProducer(bootstrap_servers="localhost:9092")
del producer  # Unclosed AIOKafkaProducer

https://github.com/aio-libs/aiokafka/blob/00349a841b5b411ada7a3596817439b9d583e16d/aiokafka/producer/producer.py#L286-L294

valq7711 avatar Oct 31 '23 06:10 valq7711