dajac opened a new pull request #9114: URL: https://github.com/apache/kafka/pull/9114
Based on the discussion in https://github.com/apache/kafka/pull/9072, I have put together an alternative way. This one does the following: * Instead of changing the implementation of the Rate to behave like a Token Bucket, it actually use two different metrics: the regular Rate and a new Token Bucket. The latter is used to enforce the quota. The code can be improved and refactored. I just wanted to get out quickly to get feedback about the approach. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org