conduktor.io ↗

max.partition.fetch.bytes — Kafka Consumer Configuration

The maximum amount of data per-partition the server will return. Records are fetched in batches by the consumer.

Description

The maximum amount of data per-partition the server will return. Records are fetched in batches by the consumer. If the first record batch in the first non-empty partition of the fetch is larger than this limit, the batch will still be returned to ensure that the consumer can make progress. The maximum record batch size accepted by the broker is defined via message.max.bytes (broker config) or max.message.bytes (topic config). See fetch.max.bytes for limiting the consumer request size.

Default Values by Kafka Version

Kafka VersionDefault Value
0.9.01048576
0.10.01048576
0.10.11048576
0.10.21048576
0.11.01048576
1.01048576
1.11048576
2.01048576
2.11048576
2.21048576
2.31048576
2.41048576
2.51048576
2.61048576 (1 mebibyte)
2.71048576 (1 mebibyte)
2.81048576 (1 mebibyte)
3.01048576 (1 mebibyte)
3.11048576 (1 mebibyte)
3.21048576 (1 mebibyte)
3.31048576 (1 mebibyte)
3.41048576 (1 mebibyte)
3.51048576 (1 mebibyte)
3.61048576 (1 mebibyte)
3.71048576 (1 mebibyte)
3.81048576 (1 mebibyte)
3.91048576 (1 mebibyte)
4.01048576 (1 mebibyte)
4.11048576 (1 mebibyte)
4.21048576 (1 mebibyte)

Tuning Recommendation

ProfileRecommendedWhy
consumer / throughput4194304Increasing the per-partition fetch limit from 1MB to 4MB reduces the number of FetchRequests needed to drain a partition's backlog by 4x. Especially impactful for consumers with few partitions or when catching up after lag accumulation.

Related Configs

fetch.min.bytes · fetch.max.bytes · max.poll.records · receive.buffer.bytes

Manage Kafka configs across all your clusters with Conduktor Console — view, compare, and update configurations in one place.