This KIP proposes to introduce new version of fetch request with new top-level parameter max_bytes to limit the size of fetch response and solve above problem.
This seems trivial to implement. We currently don't have a need for it, but if anyone wants this kind of feature, it should be easy to introduce it.
Based on KIP-74
This seems trivial to implement. We currently don't have a need for it, but if anyone wants this kind of feature, it should be easy to introduce it.