summaryrefslogtreecommitdiff
path: root/kafka/coordinator/consumer.py
diff options
context:
space:
mode:
Diffstat (limited to 'kafka/coordinator/consumer.py')
-rw-r--r--kafka/coordinator/consumer.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/kafka/coordinator/consumer.py b/kafka/coordinator/consumer.py
index fac8144..fdbb995 100644
--- a/kafka/coordinator/consumer.py
+++ b/kafka/coordinator/consumer.py
@@ -325,9 +325,10 @@ class ConsumerCoordinator(BaseCoordinator):
time.sleep(self.config['retry_backoff_ms'] / 1000.0)
- def close(self):
+ def close(self, autocommit=True):
try:
- self._maybe_auto_commit_offsets_sync()
+ if autocommit:
+ self._maybe_auto_commit_offsets_sync()
finally:
super(ConsumerCoordinator, self).close()