Bird
0
0

Given a topic with 3 partitions and 3 consumers in a group using the RoundRobinAssignor, which partition will consumer 2 receive?

medium📝 Predict Output Q4 of 15
Kafka - Consumer Groups

Given a topic with 3 partitions and 3 consumers in a group using the RoundRobinAssignor, which partition will consumer 2 receive?

APartition 2
BNo partition assigned
CPartition 0
DPartition 1
Step-by-Step Solution
Solution:
  1. Step 1: Understand RoundRobinAssignor behavior

    Partitions are assigned in round-robin order across consumers.
  2. Step 2: Assign partitions to consumers

    Partition 0 to consumer 0, partition 1 to consumer 1, partition 2 to consumer 2. Consumer 2 receives partition 2.
  3. Final Answer:

    Partition 2 -> Option A
  4. Quick Check:

    RoundRobinAssignor consumer 2 = Partition 2 [OK]
Quick Trick: RoundRobin assigns partitions evenly in order [OK]
Common Mistakes:
  • Assuming consumer 2 gets partition 0
  • Confusing consumer index
  • Ignoring round-robin order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes