📥Kafka Consumer Group
Also known as Consumer Group, Consumer Group Lag
Readers that split a topic's partitions between them. Each group reads on its own.
Think of it like
It is like a team sharing a pile of letters. Each person takes their own stack. No letter is read twice.
Example
The orders topic has 6 partitions. The billing group runs 3 readers, so each one reads 2 partitions.
Why it matters
Groups let you add readers to go faster. They also let many teams read the same topic without getting in each other's way.
Definition
Example code
console
$ kafka-consumer-groups.sh --bootstrap-server localhost:9092 \
--describe --group billingCommon mistake
Key takeaways
- 1Share the work. Partitions are split among members.
- 2One reader per partition. Within one group.
- 3Groups are separate. Each keeps its own offsets.