3 ms·
A Kafka topic is divided into partitions. A consumer group can have many consumers. The consumers inside the same group will be assigned to consume a subset of
by reese_john 4y ago
A Kafka topic is divided into partitions. A consumer group can have many consumers. The consumers inside the same group will be assigned to consume a subset of the partitions.
Say you have a topic with 10 partitions. Consumer group A has 10 consumers and Consumer group B has 1 consumer.
Each consumer in group A will be assigned to a single partition,thus processing different messages.
The single consumer in group B will be assigned to all 10 partitions, processing the same messages as group A.
Kafka is a distributed log, so this pattern is useful for replicating data across downstream applications.