Let's explore the role of consumer groups in Kafka.
What is a consumer group?
A consumer group is basically a set of one or more consumers working together in parallel to consume messages from topic partitions. Messages are equally divided among all the consumers of a group, with no two consumers receiving the same message.
Distributing partitions to consumers within a consumer group
Kafka ensures that only a single consumer reads messages from any partition within a consumer group