-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
In order to be aligned with AIOKafkaConsumer, it would be nice to able to do:
consumer = FakeAIOKafkaConsumer()
# ... some code ...
async for msg in consumer:
do_process(msg)
This should be the pseudocode of all we need in file mockafka/aiokafka/aiokafka_consumer.py
class FakeAIOKafkaConsumer:
# ....
def __aiter__(self):
return self
async def __anext__(self):
msg = await self.getone(...)
if msg is not None:
return msg
# not sure we need to worry about raise StopAsyncIteration
Just a thought...
paul-callahan, lemurchik and PeterJCLaw
Metadata
Metadata
Assignees
Labels
No labels