Consumer groups er Kafkas mekanisme for skalerbar, feiltolerant konsumering — consumere i en gruppe deler arbeidet med å konsumere en topics partisjoner, med automatisk rebalansering. Å forstå dem i dybden er nøkkelen til å bygge skalérbare Kafka-consumere.
Hvordan consumer groups distribuerer arbeidet
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)
