Skip to content

Validate consumer offset in SimpleConsumer #296

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

Merged
merged 5 commits into from
Mar 3, 2015

Conversation

ecanzonieri
Copy link
Contributor

I slightly changed the SimpleConsumer interface adding the default option use_latest_offsets. Resetting the offsets automatically is especially useful in MultiprocessConsumer, where an explicit call to the method seek is not possible.

I manually tested it in my kafka cluster, but there are no integration tests for this feature, yet.
I think that tuning "log.retention.bytes" I should be able to implement two tests.
Fix for #263

This slightly changes the SimpleConsumer interface adding the default
option use_latest_offsets. The fetch behaviour is also changed since it
does not raise OffsetOutOfRangeError anymore. Resetting the offsets
automatically is especially useful in MultiprocessConsumer, where an
explicit seek call is not possible.
@jobevers
Copy link
Contributor

👍

@ecanzonieri
Copy link
Contributor Author

I changed the code to be more like KafkaConsumer. It now uses the keyword argument auto_offset_reset, which can be either "smallest" or "largest" (default), and falls back to the old behavior otherwise.

@dpkp dpkp added the consumer label Feb 9, 2015
@farvour
Copy link

farvour commented Mar 2, 2015

Can we get this merged in? It would be nice to be able to use the Multi consumer without this problem.

@dpkp
Copy link
Owner

dpkp commented Mar 3, 2015

LGTM

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

Successfully merging this pull request may close these issues.

4 participants