0

I am using aiokafka==0.5.2 as python lib for kafka

I have just the code form the example:

async def consume():
    consumer = AIOKafkaConsumer(
        'my_topic', 'my_other_topic',
        loop=loop, bootstrap_servers='localhost:9092',
        group_id="my-group")

    await consumer.start()
    try:
        # Consume messages
        async for msg in consumer:
            #...

When I run it - it works fine. But when I stop Kafka server - my app proceed hanging waiting for messages. And, I guess, when prod server exclude Kafka node from balancing - my app know nothing about this. How could I have listener on Kafka connection inside my app?

Rudziankoŭ
  • 10,681
  • 20
  • 92
  • 192
  • Did you figure out the problem? I am facing a similar issue with aiokafka==0.5.2 – Ajay M Jan 29 '20 at 00:00
  • Hanging waiting for kafka restart is expected behavior. My issue that when rebalancing occurs - new messages doesn't come. It what i have on servers, but I wasn't able to reproduce it locally. – Rudziankoŭ Jan 29 '20 at 09:15

0 Answers0