-
Notifications
You must be signed in to change notification settings - Fork 14
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
Allow "topic claim" mode #2
Comments
I started working on this tonight but it ends up being slightly less trivial than I expected. If we just claim partition 0, that's fine, but we need to produce/store offsets to the other partitions too. Marshal won't let us track them without major refactoring since it requires (and has safeguards) about not consuming from/committing offsets to an unclaimed partition. We can make it so that it claims the rest of the partitions after claiming 0, but this definitely ends up in a state where someone else might have the other partitions briefly and we fail to claim them because they haven't yet expired (but 0 expired already -- heartbeats are jittered so we could have 0 expire first). It's not too hard to make it retry the claims in that case, though. In this mode should the health check still work or should we disable releasing unhealthy topics? If we can't handle all of the traffic from the partitions then what? Print some major errors and tell the user they've exceeded the ability to do sharded consumption? There's a lot of places that have to be updated to make this work. I still think the claim-0 mode makes sense, though, rather than trying to expand the protocol to have a |
Maybe I'm confused, but can't we just use Kafka's regular offset tracking This comment might be more cogent if I were.
|
This adds a consumer option that instructs it to claim the entire topic. This is useful in the sharded consumption design. Fixes #2.
Marshal should support an option where you can specify that you want a claim to be on the entire topic. This is used to support the sharded production use case, where you want to ensure all messages in a given shard go to a given consumer.
The text was updated successfully, but these errors were encountered: