Hi team, I found that the producer metric compression-rate-avg always returns 0 even with compression.type set to snappy. I drilled down the code and discovered that the position of bytebuffer in org.apache.kafka.common.record.Compressor is reset to 0 by RecordAccumulator.drain() before calling metric updates in sender thread.
Should I file a bug for this?