aiokafka
aiokafka copied to clipboard
Inconsistent producer start/stop
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