Skip to content
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

auto_offset_reset doesn't change much #40

Closed
groyee opened this issue Jan 29, 2017 · 2 comments
Closed

auto_offset_reset doesn't change much #40

groyee opened this issue Jan 29, 2017 · 2 comments
Labels

Comments

@groyee
Copy link

groyee commented Jan 29, 2017

I am trying to consume latest messages using:

kafka.ConfigMap{"auto.offset.reset": "latest"}

It seems that it doesn't' affect anything and still reads from the last available offset.

What I need it that it will always start consuming NEW message and ignore the previous offset.

@edenhill
Copy link
Contributor

auto.offset.reset is only used when there is no previously committed offset to continue from, or the committed offset is wrong (doesnt exist).

If you always want to start at a fixed offset (be it absolute or logical (beginning, end)) you can provide the starting .Offset per-partition in the TopicPartition you provide to Assign() from the AssignedPartitions event.

@groyee
Copy link
Author

groyee commented Jan 29, 2017

Thank You!

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

No branches or pull requests

2 participants