Skip to content

SimpleConsumer.seek with whence == 1 #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gataky opened this issue Apr 11, 2013 · 1 comment
Closed

SimpleConsumer.seek with whence == 1 #14

gataky opened this issue Apr 11, 2013 · 1 comment

Comments

@gataky
Copy link

gataky commented Apr 11, 2013

When trying to seek with whence equal to 1 we get an exception

----> 1 consumer.seek(1, 1)

/usr/local/lib/python2.7/dist-packages/kafka/consumer.pyc in seek(self, offset, whence)
     79         if whence == 1: # relative to current position
     80             for partition, _offset in self.offsets.items():
---> 81                 self.offset[partition] = _offset + offset
     82         elif whence in (0, 2): # relative to beginning or end
     83             # divide the request offset by number of partitions, distribute the remained evenly

AttributeError: 'SimpleConsumer' object has no attribute 'offset'

It looks like self.offset should be self.offsets

@mumrah mumrah closed this as completed in eff8d2b Apr 11, 2013
@mumrah
Copy link
Collaborator

mumrah commented Apr 11, 2013

@JeffMGreg thanks for the bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants