arnabnandy7 opened a new pull request, #22989:
URL: https://github.com/apache/kafka/pull/22989

   ## Description
   
   Follow-up to KAFKA-20828 and PR #22908.
   
   This change centralizes the historical KIP-219 client-throttling version 
boundaries in `AbstractResponse.shouldClientThrottle()`.
   
   For APIs that existed before KIP-219, the centralized mapping determines the 
first version that supports client-side throttling. For newer APIs, the 
behavior continues to be derived from the presence of `throttle_time_ms` in the 
response schema.
   
   This preserves the existing version-specific behavior while removing all 37 
`shouldClientThrottle()` overrides from individual response classes. Future 
throttling behavior can now be maintained in one place instead of across many 
subclasses.
   
   ## Testing
   
   The existing comprehensive regression test checks `shouldClientThrottle()` 
for every supported version of every API key. This verifies both:
   
   - Historical pre-KIP-219 version boundaries.
   - Schema-derived throttling behavior for newer APIs.
   
   The following checks passed:
   
   - `clients:test --tests org.apache.kafka.common.requests.RequestResponseTest`


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to