k-raina opened a new pull request, #19970:
URL: https://github.com/apache/kafka/pull/19970

   ## Problem
   The current issue is that when a client sends a push telemetry request with 
a compression type different from the broker's preferred compression type (the 
first in the list of supported compression types), the request is accepted 
without any log on the broker side.
   
   ## Solution
   To address this, we propose adding validation in 
`ClientMetricsManager.validatePushRequest()` to ensure that the compression 
type in the push telemetry request matches the broker's preferred compression 
type. If a mismatch is found, an `InvalidRequestException` should be thrown. 
Importantly, the `InvalidRequestException` doesn't block the push telemetry 
request from proceeding.
   
   ## Changes
   - Added validation in `validatePushRequest()` to check compression type 
mismatch
   - Added error message that includes both the received and preferred 
compression types
   - Added test cases to verify the new validation
   
   ## Testing
   - Added unit tests to verify compression type validation and Verified 
existing telemetry functionality continues to work as expected


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to