diff options
author | Commander Dishwasher <roy.antman@gmail.com> | 2019-09-30 10:23:06 -0400 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2019-09-30 07:23:06 -0700 |
commit | 298cb0dbef58f6bb267235911b6ca86039bf8cda (patch) | |
tree | 0d9686680bf2488151047b2af716044337021b1b /kafka/coordinator/consumer.py | |
parent | 0f929bd866f1526fc5d18068c31903f1ae3393d2 (diff) | |
download | kafka-python-298cb0dbef58f6bb267235911b6ca86039bf8cda.tar.gz |
Issue #1780 - Consumer hang indefinitely in fetcher._retrieve_offsets() due to topic deletion while rebalancing (#1782)
Diffstat (limited to 'kafka/coordinator/consumer.py')
-rw-r--r-- | kafka/coordinator/consumer.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kafka/coordinator/consumer.py b/kafka/coordinator/consumer.py index 9d6f4eb..9b7a3cd 100644 --- a/kafka/coordinator/consumer.py +++ b/kafka/coordinator/consumer.py @@ -225,7 +225,11 @@ class ConsumerCoordinator(BaseCoordinator): self._subscription.needs_fetch_committed_offsets = True # update partition assignment - self._subscription.assign_from_subscribed(assignment.partitions()) + try: + self._subscription.assign_from_subscribed(assignment.partitions()) + except ValueError as e: + log.warning("%s. Probably due to a deleted topic. Requesting Re-join" % e) + self.request_rejoin() # give the assignor a chance to update internal state # based on the received assignment |