long bufferPoolAvailableMemory() {
        return free.availableMemory();
    }
Package private for unit test. Get the buffer pool remaining size in bytes.
clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java