diff options
Diffstat (limited to 'kafka/coordinator/consumer.py')
-rw-r--r-- | kafka/coordinator/consumer.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kafka/coordinator/consumer.py b/kafka/coordinator/consumer.py index fdbb995..00b8b6b 100644 --- a/kafka/coordinator/consumer.py +++ b/kafka/coordinator/consumer.py @@ -326,6 +326,14 @@ class ConsumerCoordinator(BaseCoordinator): time.sleep(self.config['retry_backoff_ms'] / 1000.0) def close(self, autocommit=True): + """Close the coordinator, leave the current group, + and reset local generation / member_id. + + Keyword Arguments: + autocommit (bool): If auto-commit is configured for this consumer, + this optional flag causes the consumer to attempt to commit any + pending consumed offsets prior to close. Default: True + """ try: if autocommit: self._maybe_auto_commit_offsets_sync() |