Integration / Apache Kafka Interview questions
When would you choose the cooperative sticky partition assignment strategy?
Partition assignment strategies decide how a consumer group's partitions get distributed among members during a rebalance, and they differ mainly in how much churn they cause when membership changes.
| Strategy | Behavior |
| Range | Assigns contiguous partition ranges per topic; can be uneven with multiple topics. |
| Round Robin | Spreads partitions evenly across members, topic-agnostic. |
| Sticky | Minimizes partition movement between rebalances, but still uses the eager (stop-the-world) protocol. |
| Cooperative Sticky | Same stickiness goal as Sticky, but with incremental rebalancing so unaffected partitions keep processing. |
partition.assignment.strategy=org.apache.kafka.clients.consumer.CooperativeStickyAssignor
Cooperative sticky is the right default choice for most production groups, especially larger ones or ones with frequent membership changes (autoscaling consumer pools, rolling deployments), because it combines minimal partition movement (less state to rebuild, less cache-warming cost per rebalance) with incremental rebalancing (no full-group processing pause). It's less necessary for a small, stable group that rarely changes membership, where the difference between strategies is unlikely to be noticeable in practice.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
