Consider a Kafka consumer group with two consumers consuming from four partitions. The group uses eager rebalancing. What is the expected behavior during a rebalance when a new consumer joins?
Consumer group with 2 consumers consuming 4 partitions. New consumer joins triggering eager rebalance. What happens to partition assignment during rebalance?
Think about how eager rebalancing handles partition revocation and assignment.
Eager rebalancing revokes all partitions from all consumers before reassigning them. This causes a full stop and restart of consumption during rebalance.
In a Kafka consumer group using cooperative rebalancing, what happens when a new consumer joins the group?
Consumer group with 3 consumers consuming 6 partitions. New consumer joins triggering cooperative rebalance. What is the behavior during partition reassignment?
Cooperative rebalancing tries to minimize disruption. How does it do that?
Cooperative rebalancing revokes partitions incrementally, so consumers keep processing some partitions while others are reassigned, reducing downtime.
Which of the following is the main advantage of cooperative rebalancing compared to eager rebalancing in Kafka consumer groups?
Think about how downtime affects consumer processing.
Cooperative rebalancing reduces downtime by revoking partitions incrementally, so consumers keep processing some partitions during rebalance.
What error will a Kafka consumer raise if it tries to use cooperative rebalancing but the client library does not support it?
KafkaConsumer consumer = new KafkaConsumer(props);
consumer.subscribe(topics, new CooperativeRebalanceListener());
consumer.poll(Duration.ofMillis(100));Check what happens when a feature is not supported by the Kafka broker or client.
If the client or broker does not support cooperative rebalancing, an UnsupportedVersionException is thrown indicating the feature is unavailable.
You are designing a Kafka consumer group for a critical application that must minimize downtime during rebalances caused by scaling consumers up or down. Which rebalance strategy and configuration should you choose?
Consider which strategy reduces consumer downtime and supports dynamic scaling.
Cooperative rebalancing allows incremental partition revocation and assignment, minimizing downtime during scaling events, making it ideal for critical applications.