fetch.min.bytes — Kafka Consumer Configuration
The minimum amount of data the server should return for a fetch request. If insufficient data is available the request will wait for that much data to accumulate before answering the request.
Description
The minimum amount of data the server should return for a fetch request. If insufficient data is available the request will wait for that much data to accumulate before answering the request. The default setting of 1 byte means that fetch requests are answered as soon as that many byte(s) of data is available or the fetch request times out waiting for data to arrive. Setting this to a larger value will cause the server to wait for larger amounts of data to accumulate which can improve server throughput a bit at the cost of some additional latency.
Default Values by Kafka Version
| Kafka Version | Default Value |
|---|---|
| 0.8.0 | 1 |
| 0.8.1 | 1 |
| 0.8.2 | 1 |
| 0.9.0 | 1 |
| 0.10.0 | 1 |
| 0.10.1 | 1 |
| 0.10.2 | 1 |
| 0.11.0 | 1 |
| 1.0 | 1 |
| 1.1 | 1 |
| 2.0 | 1 |
| 2.1 | 1 |
| 2.2 | 1 |
| 2.3 | 1 |
| 2.4 | 1 |
| 2.5 | 1 |
| 2.6 | 1 |
| 2.7 | 1 |
| 2.8 | 1 |
| 3.0 | 1 |
| 3.1 | 1 |
| 3.2 | 1 |
| 3.3 | 1 |
| 3.4 | 1 |
| 3.5 | 1 |
| 3.6 | 1 |
| 3.7 | 1 |
| 3.8 | 1 |
| 3.9 | 1 |
| 4.0 | 1 |
| 4.1 | 1 |
| 4.2 | 1 |
Tuning Recommendation
| Profile | Recommended | Why |
|---|---|---|
| consumer / throughput | 65536 | Default of 1 byte causes the broker to respond to every FetchRequest immediately with whatever data is available, even a single record. Setting 64KB forces the broker to accumulate at least 64KB before responding, batching more records per network round-trip and reducing per-record overhead by 10-50x under moderate load. |
| consumer / latency | 1 | The default of 1 byte is already the minimum: the broker responds immediately to every FetchRequest as soon as at least 1 byte is available. Keeping it at 1 ensures records are delivered to poll() as fast as they arrive, without any broker-side batching delay. |
Related Configs
fetch.max.wait.ms · fetch.max.bytes · max.partition.fetch.bytes