Consumer groups adalah mekanisme Kafka untuk konsumsi yang scalable dan fault-tolerant — consumers dalam sebuah group berbagi pekerjaan mengonsumsi partisi topic, dengan rebalancing otomatis. Memahami mereka secara mendalam adalah kunci untuk membangun Kafka consumers yang scalable.
Bagaimana consumer groups mendistribusikan pekerjaan
A CONSUMER GROUP = consumers cooperating to consume a topic:
→ each PARTITION is assigned to exactly ONE consumer in the group (at a time)
→ partitions are distributed across the group's consumers → PARALLEL consumption
→ e.g. 6 partitions, 3 consumers → 2 partitions each
→ scale consumption by adding consumers (UP TO the partition count — extra consumers idle)
