Bird
0
0

Given a consumer group with 3 consumers and 6 partitions, what happens after one consumer leaves the group?

medium📝 Predict Output Q13 of 15
Kafka - Consumer Groups
Given a consumer group with 3 consumers and 6 partitions, what happens after one consumer leaves the group?
AThe consumer group stops consuming messages
BThe remaining 2 consumers rebalance and each consumes 3 partitions
CThe partitions are left unassigned until the group is restarted
DThe remaining consumers continue consuming their original partitions
Step-by-Step Solution
Solution:
  1. Step 1: Understand partition assignment

    Partitions are divided evenly among active consumers in the group.
  2. Step 2: Calculate new assignment after consumer leaves

    With 6 partitions and 2 consumers left, each gets 3 partitions after rebalance.
  3. Final Answer:

    The remaining 2 consumers rebalance and each consumes 3 partitions -> Option B
  4. Quick Check:

    Partitions evenly split after consumer leaves [OK]
Quick Trick: Partitions redistribute evenly after consumer leaves [OK]
Common Mistakes:
  • Assuming partitions stay with old consumers
  • Thinking partitions become unassigned
  • Believing the group stops consuming

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes