-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Handle EOF partition error properly in Consumer#each #12
Comments
You can configure this behaviour with I see a few options:
I think probably handling the exception makes the most sense. Not sure what is the nicest way to handle this, will think about it. What do you think? |
I'm currently writing a Kafka Streams-like processor where I want to store the state in a compacted topic and read the state back into memory on start for which I need to know when I'm done. This could be accomplished by this special eof message. For most processors however this EOF messages is not needed so this should be configurable IMO. |
It is configurable already with |
@thijsc Ah yes, of course, there is no need for a configuration option in this library then, when the library receives an eof 'error' message it should yield some kind of special eof message. The |
Indeed. This issue is still open because I want to make the error handling nicer, but the configuration is good as is. |
By the way: If you want complete control over this you're probably better off calling |
I'm still not sure how to make this better than it is, so decided to add a note in 45055f1 and close this. If anyone has good ideas about this one feel free to reopen. |
When trying this library I got the following error:
I think the #each method should handle these errors (ignore them, or pass these notifications to the block). Currently the each method itself raises an exception when you reach the end of the partition which is probably not what people expect from this library.
The text was updated successfully, but these errors were encountered: