Bird
0
0

Given a consumer group with 2 consumers and 4 partitions, if one consumer leaves, how many partitions will the remaining consumer consume after rebalance?

medium📝 Predict Output Q4 of 15
Kafka - Consumer Groups
Given a consumer group with 2 consumers and 4 partitions, if one consumer leaves, how many partitions will the remaining consumer consume after rebalance?
A4 partitions
B0 partitions
C1 partition
D2 partitions
Step-by-Step Solution
Solution:
  1. Step 1: Understand partition assignment before rebalance

    With 2 consumers and 4 partitions, each consumer likely has 2 partitions.
  2. Step 2: Analyze effect of one consumer leaving

    After one consumer leaves, the remaining consumer must consume all 4 partitions.
  3. Final Answer:

    4 partitions -> Option A
  4. Quick Check:

    Partitions after consumer leaves = all assigned to remaining consumer [OK]
Quick Trick: Remaining consumer takes all partitions after rebalance [OK]
Common Mistakes:
  • Assuming partitions are evenly split without rebalance
  • Thinking partitions are lost when consumer leaves
  • Believing partitions remain unassigned

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes