Skip to content

Safely handle first consume with auto.offset.reset latest and reaching end of partition #3905

Answered by nick-zh
herndlm asked this question in Q&A
Discussion options

You must be logged in to vote

So regarding your first question:

  1. Not caring about old messages but then still expecting some is kind of confusing to me. auto.offset.reset will be used and applied the first time you connect or when you have no commited offset. So if you want to skip old messages, but get all future ones, you might want to connect with LATEST but commit the current offset (i think this is what you are trying to achieve)
  2. If you want to get EOF you need to enable it, the default behaviour was changed (see example)

I hope that helps to clear things up.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@herndlm
Comment options

@nick-zh
Comment options

@herndlm
Comment options

Answer selected by herndlm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants