# Implementation for fetch.max.wait.ms with multiple partitions

**URL:** <https://forum.confluent.io/t/implementation-for-fetch-max-wait-ms-with-multiple-partitions/5787>\
**Category:** Java Clients\
**Created:** [15 August 2022 14:09 UTC](https://forum.confluent.io/t/implementation-for-fetch-max-wait-ms-with-multiple-partitions/5787 "2022-08-15T14:09:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhagoel](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@mhagoel](https://forum.confluent.io/u/mhagoel)\
**Post date:** [15 August 2022 14:09 UTC](https://forum.confluent.io/t/implementation-for-fetch-max-wait-ms-with-multiple-partitions/5787/1 "2022-08-15T14:09:00Z")

</div>

Kafka offers the configuration properties of:  
fetch.max.wait.ms (and fetch.min.bytes that relates to it)

This configurations is enforced by the broker, and therefor only useful when the topic has 1 partition. In the case of multiple partitions, one broker can no longer enforce this configuration and it doesn’t work.

I want to ask if there is an implementation on the consumer side, meaning:

1. If a batch is bigger than size X - continue with the batch
2. if a batch is smaller than size X but Y time has passed since a batch was read - continue with the batch
3. if the batch is smaller than size X and time is less than Y, mark the batch as unread (so messages will be taken again) and sleep for some time before trying again.
