diff options
author | Omar <omar.ghishan@rd.io> | 2014-04-03 16:47:52 -0700 |
---|---|---|
committer | Omar <omar.ghishan@rd.io> | 2014-04-03 16:47:52 -0700 |
commit | 13d0d445da2060b1b94c742e9d69cb1db22fc775 (patch) | |
tree | a337519e311b531c6731b23b07c9e0b73a405c12 | |
parent | 9bed11db98387c0d9e456528130b330631dc50af (diff) | |
parent | 7d425d07c26b7900aae741a7b89c7001907b73a9 (diff) | |
download | kafka-python-13d0d445da2060b1b94c742e9d69cb1db22fc775.tar.gz |
Merge pull request #148 from wizzat/seek_commit
Make seek(); commit(); work without commit discarding the seek change
-rw-r--r-- | kafka/consumer.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kafka/consumer.py b/kafka/consumer.py index 28b53ec..8ac28da 100644 --- a/kafka/consumer.py +++ b/kafka/consumer.py @@ -305,6 +305,10 @@ class SimpleConsumer(Consumer): # Reset queue and fetch offsets since they are invalid self.fetch_offsets = self.offsets.copy() + if self.auto_commit: + self.count_since_commit += 1 + self.commit() + self.queue = Queue() def get_messages(self, count=1, block=True, timeout=0.1): |