Add topic and partition watching#23
Open
wvanbergen wants to merge 3 commits intomasterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds watching partitions and topics for changes using Zookeeper watches.
Implementation
I also reworked the way we deal with Zookeeper watches. Zookeeper watches are inherently multithreaded, but I would like to hide this from the external API.
Thos most common use case is:
The API I am using right now is:
A small complication is that we sometimes want to set multiple zookeeper watches, and continue our processing when any of them fires. Right now, this is implemented by sharing a
ConditionVariableinstance:I am not a big fan of how this looks though. Any suggestions for a better API?