From aac6727d2fdf59e09c1f42da19a9a894304acc00 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 8 Apr 2019 21:10:45 -0700 Subject: small kafka tweaks for robustness --- python/fatcat_tools/importers/common.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python/fatcat_tools/importers') diff --git a/python/fatcat_tools/importers/common.py b/python/fatcat_tools/importers/common.py index 4648f6f3..0ca2617b 100644 --- a/python/fatcat_tools/importers/common.py +++ b/python/fatcat_tools/importers/common.py @@ -502,6 +502,9 @@ def make_kafka_consumer(hosts, env, topic_suffix, group): } def on_rebalance(consumer, partitions): + for p in partitions: + if p.error: + raise KafkaException(p.error) print("Kafka partitions rebalanced: {} / {}".format( consumer, partitions)) -- cgit v1.2.3