Last active
February 26, 2024 03:42
-
-
Save DFilyushin/b89d1f7379b8cd70d405c5427fedd299 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async def callback_sessions(msg, topic): | |
pass | |
def consumer_factory(): | |
for t in topics: | |
yield AsyncJafkaConsumer(topic=t, ..., callback=partial(callback_sessions, topic=t)) | |
def run(): | |
for c in consumer_factory(): | |
asyncio.ensure_future(c.consume()) | |
loop = asyncio.get_event_loop() | |
loop.run_forever() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment