Confluent
CCDAK · Question #120
There are two consumers C1 and C2 belonging to the same group G subscribed to topics T1 and T2. Each of the topics has 3 partitions. How will the partitions be assigned to consumers with Partition Ass
The correct answer is A. C1 will be assigned partitions 0 and 2 from T1 and partition 1 from T2. C2 will have partition 1. The correct option is the only one where the two consumers share an equal number of partitions amongst the two topics of three partitions.
Developing Kafka Consumers
Question
There are two consumers C1 and C2 belonging to the same group G subscribed to topics T1 and T2. Each of the topics has 3 partitions. How will the partitions be assigned to consumers with Partition Assigner being Round Robin Assigner?
Options
- AC1 will be assigned partitions 0 and 2 from T1 and partition 1 from T2. C2 will have partition 1
- BTwo consumers cannot read from two topics at the same time
- CC1 will be assigned partitions 0 and 1 from T1 and T2, C2 will be assigned partition 2 from T1 and
- DAll consumers will read from all partitions
How the community answered
(27 responses)- A67% (18)
- B4% (1)
- C19% (5)
- D11% (3)
Explanation
The correct option is the only one where the two consumers share an equal number of partitions amongst the two topics of three partitions.
Topics
#RoundRobinAssigner#partition assignment#multi-topic consumer group#consumer rebalancing
Community Discussion
No community discussion yet for this question.