public static CompressionType preferredCompressionType(List<CompressionType> acceptedCompressionTypes) {
        if (acceptedCompressionTypes != null && !acceptedCompressionTypes.isEmpty()) {
            // Broker is providing the compression types in order of preference. Grab the
            // first one.
            return acceptedCompressionTypes.get(0);
        }
        return CompressionType.NONE;
    }
Examine the response data and handle different error code accordingly:

<ul>
    <li>Invalid Request: Disable Telemetry</li>
    <li>Invalid Record: Disable Telemetry</li>
    <li>Unsupported Version: Disable Telemetry</li>
    <li>UnknownSubscription or Unsupported Compression: Retry immediately</li>
    <li>TelemetryTooLarge or ThrottlingQuotaExceeded: Retry as per next interval</li>
</ul>

@param errorCode response body error code
@param intervalMs current push interval in milliseconds

@return Optional of push interval in milliseconds
clients/src/main/java/org/apache/kafka/common/telemetry/internals/ClientTelemetryUtils.java