fetch.min.bytes tells the Kafka broker to wait until a fetch response contains at least the configured number of bytes. Its default value is 1, so the broker responds when at least one byte of new messages is available. Responses contain whole batches and may contain several batches. section 6.4.1 section 9.2
The setting trades latency for bandwidth. A larger value encourages fuller responses and can improve consumer throughput, while fetch.max.wait.ms limits how long the broker waits when insufficient data arrives. Its default is 500 ms. Never set either setting to 0: immediate responses can create excessive fetch-request load, including requests issued in parallel for every partition. section 6.4.1 section 6.5
Testing a 1 MB fetch threshold
Create consumer.properties with fetch.min.bytes: 1000000 and fetch.max.wait.ms: 500, then pass it to kafka-consumer-perf-test.sh with --consumer.config. In the reported test, consuming the same 1,000,000 messages and about 9.5 GB took 13 seconds instead of 17, increasing throughput from 547 MB/s to 734 MB/s. Hardware and consumer processing speed can change the result. section 6.4.2
fetch.min.bytes: 1000000 fetch.max.wait.ms: 500
Inspect the consumer.properties values used to raise fetch.min.bytes to 1 MB and retain a 500 ms maximum wait. section 6.4.2
