-
Notifications
You must be signed in to change notification settings - Fork 289
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
Cooperative Incremental sticky rebalance #364
Conversation
src/consumer/mod.rs
Outdated
@@ -91,6 +99,12 @@ pub trait ConsumerContext: ClientContext { | |||
#[allow(unused_variables)] | |||
fn pre_rebalance<'a>(&self, rebalance: &Rebalance<'a>) {} | |||
|
|||
/// Override this to return true when using cooperative-sticky option for | |||
/// partition.assignment.strategy | |||
fn is_incremental_assign(&self) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function can be avoid if there is a way to read the config partition.assignment.strategy
value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I figured out how to do this automatically.
52120dc
to
13b3327
Compare
@SreeniIO I pushed a new implementation that auto-detects whether cooperative rebalancing is in use. Could you give this a spin and let me know if it works for your use case? |
Yes, it works fine. For Cooperative rebalancing, since not all partitions are revoked during a rebalance, can you add the TopicPartitionList being revoked as part of the pub enum Rebalance<'a> {
/// A new partition assignment is received.
Assign(&'a TopicPartitionList),
/// All partitions are revoked.
Revoke, // can this be changed to Revoke(&'a TopicPartitionList),
/// Unexpected error from Kafka.
Error(String),
} |
any news about this one? :) |
13b3327
to
deb9c3f
Compare
deb9c3f
to
7321941
Compare
Ack. I filed #398 for this. |
Fixes: #363