Kafka 4.2 Share Groups introduce a new parallelism model where consumers can scale beyond partition count. However, the default max.poll.records=500 causes a 'greedy-capture regime' where a few consumers monopolize the inflight record budget (group.share.partition.max.record.locks, default 2000), leaving others idle. With 300 consumers and 5ms processing time, default config yields only 4800 msg/s instead of the theoretical 60K msg/s. The fix is to set max.poll.records = group.share.partition.max.record.locks / consumers_per_partition, then reduce further to account for timing variance. With max.poll.records=30 and 312 consumers across 6 partitions, the benchmark achieves the target 60K msg/s. The post also warns about an 'accidental fair-sharing regime' that can mask the misconfiguration under low load, only to collapse under higher throughput.

13m read timeFrom jack-vanlightly.com
Post cover image
Table of contents
Two regimes: Accidental fair-sharing vs greedy-captureTesting the stability of accidental fair-sharing
2 Impressions