replica.fetch.max.bytes — Kafka Broker Configuration
The number of bytes of messages to attempt to fetch for each partition. This is not an absolute maximum, if the first record batch in the first non-empty partition of the fetch is larger than this value, the record batch will still be returned to ensure that progress can be made.
Description
The number of bytes of messages to attempt to fetch for each partition. This is not an absolute maximum, if the first record batch in the first non-empty partition of the fetch is larger than this value, the record batch will still be returned to ensure that progress can be made. The maximum record batch size accepted by the broker is defined via message.max.bytes (broker config) or max.message.bytes (topic config).
Default Values by Kafka Version
| Kafka Version | Default Value |
|---|---|
| 0.8.0 | 1024 * 1024 |
| 0.8.1 | 1024 * 1024 |
| 0.8.2 | 1024 * 1024 |
| 0.9.0 | 1048576 |
| 0.10.0 | 1048576 |
| 0.10.1 | 1048576 |
| 0.10.2 | 1048576 |
| 0.11.0 | 1048576 |
| 1.0 | 1048576 |
| 1.1 | 1048576 |
| 2.0 | 1048576 |
| 2.1 | 1048576 |
| 2.2 | 1048576 |
| 2.3 | 1048576 |
| 2.4 | 1048576 |
| 2.5 | 1048576 |
| 2.6 | 1048576 (1 mebibyte) |
| 2.7 | 1048576 (1 mebibyte) |
| 2.8 | 1048576 (1 mebibyte) |
| 3.0 | 1048576 (1 mebibyte) |
| 3.1 | 1048576 (1 mebibyte) |
| 3.2 | 1048576 (1 mebibyte) |
| 3.3 | 1048576 (1 mebibyte) |
| 3.4 | 1048576 (1 mebibyte) |
| 3.5 | 1048576 (1 mebibyte) |
| 3.6 | 1048576 (1 mebibyte) |
| 3.7 | 1048576 (1 mebibyte) |
| 3.8 | 1048576 (1 mebibyte) |
| 3.9 | 1048576 (1 mebibyte) |
| 4.0 | 1048576 (1 mebibyte) |
| 4.1 | 1048576 (1 mebibyte) |
| 4.2 | 1048576 (1 mebibyte) |
Tuning Recommendation
| Profile | Recommended | Why |
|---|---|---|
| broker / throughput | 10485760 | Increasing the per-fetch-request byte limit to 10MB allows follower fetchers to pull more data per round-trip, reducing replication lag at high produce rates. The default 1MB cap causes replication round-trips to dominate at >100MB/s ingestion. |
Related Configs
num.replica.fetchers · message.max.bytes · replica.socket.receive.buffer.bytes