for consumed_record in KafkaConsumer(config.kafka_topic,
bootstrap_servers=config.kafka_bootstrap_servers,
group_id=config.kafka_group_id):
__process_kafka_record(consumed_record)
The code above works fine except when EOF
is seen. Then for
loop terminates, however that's not the behaviour I'd like. I want my consumer to run endlessly unless the entire process dies. Conceptually I need something like if is_eof(): continue
. What's the right way to do that with python-kafka
package?