-
Notifications
You must be signed in to change notification settings - Fork 252
Open
Description
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 AIOKafkaProduceraiokafka/aiokafka/producer/producer.py
Lines 286 to 294 in 00349a8
| self._closed = False | |
| # Warn if producer was not closed properly | |
| # We don't attempt to close the Consumer, as __del__ is synchronous | |
| def __del__(self, _warnings=warnings): | |
| if self._closed is False: | |
| _warnings.warn(f"Unclosed AIOKafkaProducer {self!r}", | |
| ResourceWarning, | |
| source=self) |
jonathansick
Metadata
Metadata
Assignees
Labels
No labels