diff options
Diffstat (limited to 'kafka/consumer.py')
-rw-r--r-- | kafka/consumer.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kafka/consumer.py b/kafka/consumer.py index 3b64571..c9f12e1 100644 --- a/kafka/consumer.py +++ b/kafka/consumer.py @@ -83,6 +83,11 @@ class SimpleConsumer(object): for partition in self.client.topic_partitions[topic]: self.offsets[partition] = 0 + def stop(self): + if self.commit_timer is not None: + self.commit_timer.stop() + self.commit() + def seek(self, offset, whence): """ Alter the current offset in the consumer, similar to fseek |