Bird
0
0

In a Kafka consumer group using cooperative rebalancing, what is the expected behavior when a consumer leaves?

medium📝 Predict Output Q5 of 15
Kafka - Consumer Groups
In a Kafka consumer group using cooperative rebalancing, what is the expected behavior when a consumer leaves?
AOnly partitions assigned to the leaving consumer are revoked and reassigned.
BAll partitions in the group are revoked and reassigned to remaining consumers.
CThe group pauses consumption until a manual restart.
DPartitions assigned to the leaving consumer remain unassigned.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze cooperative rebalancing on consumer leave

    Cooperative rebalancing revokes only the partitions of the leaving consumer and reassigns them incrementally.
  2. Step 2: Eliminate other options

    Full revocation is eager behavior; pausing or leaving partitions unassigned is incorrect.
  3. Final Answer:

    Only partitions assigned to the leaving consumer are revoked and reassigned. -> Option A
  4. Quick Check:

    Cooperative rebalance on leave = C [OK]
Quick Trick: Cooperative rebalance revokes only leaving consumer's partitions [OK]
Common Mistakes:
  • Assuming full rebalance on consumer leave
  • Thinking partitions remain unassigned
  • Believing group pauses consumption

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes