...
The consumer (Fetcher) delays decompression until the records are returned to the user, but because of max.poll.records
, it may end up holding onto the decompressed data from a single partition for a few iterations. Therefore buffer.memory
is not a hard bound constraint on the consumer's memory usage as mentioned in the setting's description.
To protect against a risk of
Caveats:
There is a risk using the MemoryPool that, after we fill up the memory with fetch data, we can starve the coordinator's connection. For example, if we send a bunch of pre-fetches right before returning to the user, these fetches might return before the next call to poll(), in which case we might not have enough memory to receive heartbeats, which would block us from sending additional heartbeats until the next call to poll().
...