public static long producerRecordSizeInBytes(final ProducerRecord<byte[], byte[]> record) {
        return recordSizeInBytes(
            record.key() == null ? 0 : record.key().length,
            record.value() == null ? 0 : record.value().length,
            record.topic(),
            record.headers()
        );
    }
@throws StreamsException if the admin client request throws an exception
streams/src/main/java/org/apache/kafka/streams/processor/internals/ClientUtils.java