Bird
0
0

How does Kafka ensure that each partition is processed by only one consumer in a group?

easy📝 Conceptual Q2 of 15
Kafka - Consumer Groups
How does Kafka ensure that each partition is processed by only one consumer in a group?
ABy allowing multiple consumers to read the same partition simultaneously.
BBy assigning each partition exclusively to one consumer in the group.
CBy duplicating messages to all consumers in the group.
DBy limiting the number of partitions to one per topic.
Step-by-Step Solution
Solution:
  1. Step 1: Understand partition assignment

    Kafka assigns each partition to exactly one consumer in a group to avoid duplicate processing.
  2. Step 2: Confirm exclusivity

    This exclusive assignment ensures no two consumers read the same partition simultaneously.
  3. Final Answer:

    By assigning each partition exclusively to one consumer in the group. -> Option B
  4. Quick Check:

    Partition assignment exclusivity = A [OK]
Quick Trick: Each partition goes to only one consumer in a group [OK]
Common Mistakes:
  • Assuming multiple consumers read the same partition
  • Thinking messages are duplicated to all consumers
  • Believing topics have only one partition

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes