Open dom-gunstone opened 1 month ago
No, consumer instance is not reusable, you have to recreate it.
@ods Thanks for confirming.
Is this something that could be implemented, or is it not possible?
It's possible to fix this, but I wouldn't expect somebody to invest their time in it.
Hi,
I have a use case where I'm injecting a
AIOKafkaConsumer
instance into a class. The class has its ownstart
andstop
methods that, amongst other things, call thestart
andstop
methods of the consumer class. The issue is that I'm failing theassert self._fetcher is None
check inAIOKafkaConsumer.start()
method.Am I right in thinking this should work?
I suppose I could pass the class a function that creates the consumer instance, but it feels a bit less neat.