Consumer groups er Kafkas mekanisme for skalerbar, fejltolerant forbrug — consumere i en gruppe deler arbejdet med at forbruge en topics partitioner, med automatisk rebalancering. At forstå dem i dybden er nøglen til at bygge skalérbare Kafka-consumere.
Hvordan consumer groups distribuerer arbejdet
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)
