Repository navigation
Conversation
evanh
approved these changes
Oct 23, 2026
evanh
approved these changes
Oct 23, 2026
| activation_store.assign_partitions(&mut assignment.partitions.iter().map(TopicPartition::from)); | ||
| for (partition, assignment) in assignment.split() { | ||
| let previous = pipelines.insert(partition, spawn_actors(consumer.clone(), assignment)); | ||
| assert!(previous.is_none(), "Got assignment for a partition we're already consuming from"); |
Member
There was a problem hiding this comment.
Should we assert here? Is this really an error we should crash on?
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.
Adds the
kafka_cooperative_rebalanceconfig. When enabled, consumers join their groups with librdkafka'scooperative-stickyassignor instead of the default eager assignors, so a rebalance only moves the partitions that change owner instead of revoking every partition.Changes
kafka_cooperative_rebalancesetspartition.assignment.strategy: cooperative-stickyfor every consumed topic in the pool.handle_events_cooperativeruns one pipeline per partition, so an incremental revoke flushes and commits only the revoked partitions while the rest keep consuming. Eager mode keeps the existinghandle_eventswith one shared pipeline.With the config disabled, behavior is unchanged. Except for that
InconsistentGroupProtocolno longer terminate the broker.arroyo.consumer.inconsistent_group_protocol, and keeps retrying (they will successfully join when all current eager members leave the group)Notes
I would only roll this out for push taskbroker pools. The reasons are that we could use
maxSurge: 100%andmaxUnavailable: 0for a Deployment.We would then have N cooperative pods start next to the N eager pods and push from the shared store while they wait to join, then all eager pods terminate together and the cooperative pods join the group at once.
This showed up in local load testing for me, but
max_pending_countisn't strict in cooperative mode, each per-partition writer checks the pending count and then inserts, so concurrent writers can overshoot.