philipnee commented on code in PR #15148:
URL: https://github.com/apache/kafka/pull/15148#discussion_r1446620286


##########
clients/src/main/java/org/apache/kafka/common/telemetry/internals/ClientTelemetryUtils.java:
##########
@@ -175,16 +182,40 @@ public static boolean 
validateRequiredResourceLabels(Map<String, String> metadat
     }
 
     public static CompressionType 
preferredCompressionType(List<CompressionType> acceptedCompressionTypes) {
-        // TODO: Support compression in client telemetry.
+        if (acceptedCompressionTypes != null && 
!acceptedCompressionTypes.isEmpty()) {
+            // Broker is providing the compression types in order of 
preference. Grab the
+            // first one.
+            return acceptedCompressionTypes.get(0);

Review Comment:
   out of curiousity - when would we not use the first one?



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