Unified backport of PRs #5421 and #5430

Also compare backport to `0.11.0` #5641

### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation 
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)


[ Full content available at: https://github.com/apache/kafka/pull/5657 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to