DBRaven
Relationship · Supports
Source: Technology·Target: Pattern

Summary

Kafka consumer groups are the canonical implementation of the competing consumers pattern. Each consumer group member is assigned an exclusive subset of topic partitions, ensuring each message is processed by exactly one consumer within the group while enabling horizontal scaling up to the partition count.

Evidence

  • ·Kafka consumer group protocol assigns each partition to exactly one consumer in the group
  • ·Consumer group rebalancing handles consumer join/leave events automatically
  • ·Kafka consumer group offsets provide at-least-once delivery semantics
  • ·Partition count defines the maximum concurrency ceiling for a consumer group
  • ·kafka-consumer-groups.sh tool exposes per-partition consumer lag for monitoring

Operational Context

  • ·Consumer count beyond the partition count results in idle consumers: add partitions to increase parallelism ceiling
  • ·Rebalance events during consumer group membership changes cause a brief processing pause; minimize consumer restarts
  • ·Consumer group lag (per partition offset difference) is the primary scaling signal
  • ·Increasing partition count on an existing topic requires data migration; plan partition count for 2–3× expected peak concurrency

Tradeoffs

  • ·Partition ceiling bounds parallelism; over-partitioned topics add controller overhead
  • ·Rebalancing pauses processing; eager vs cooperative rebalancing protocols trade pause duration for complexity
  • ·At-least-once delivery requires idempotent consumers to handle redelivery on rebalance

Generator Relevance

Kafka + competing_consumers is the standard recommendation for queue-based work distribution at high throughput. Architecture generator should surface this combination for workloads requiring parallel message processing with durable delivery semantics.

Evidence grounding

Grounded, 5 supporting items

Kafka's consumer group model is the defining implementation of competing consumers at scale. The partition-to-consumer assignment mechanism is core to Kafka's design and extensively documented in Apache Kafka documentation and operational literature.