Bird
0
0

You have 3 consumers in a group but only 2 partitions in the topic. What issue will occur?

medium📝 Debug Q14 of 15
Kafka - Consumer Groups
You have 3 consumers in a group but only 2 partitions in the topic. What issue will occur?
AAll consumers will share partitions equally.
BOne consumer will be idle with no partitions assigned.
CKafka will create a new partition automatically.
DConsumers will read duplicate messages from partitions.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze partition to consumer ratio

    There are fewer partitions (2) than consumers (3), so not all consumers get partitions.
  2. Step 2: Understand assignment behavior

    Kafka assigns partitions exclusively; one consumer will have no partition and remain idle.
  3. Final Answer:

    One consumer will be idle with no partitions assigned. -> Option B
  4. Quick Check:

    Partitions < consumers means idle consumers [OK]
Quick Trick: More consumers than partitions means some idle consumers [OK]
Common Mistakes:
  • Expecting Kafka to auto-create partitions
  • Assuming consumers share partitions simultaneously
  • Thinking all consumers always get messages

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes