private void setPartition(AppendCallbacks callbacks, int partition) {
        if (callbacks != null)
            callbacks.setPartition(partition);
    }
Create a new record accumulator with default partitioner config

@param logContext The log context used for logging
@param batchSize The size to use when allocating {@link MemoryRecords} instances
@param compression The compression codec for the records
@param lingerMs An artificial delay time to add before declaring a records instance that isn't full ready for
       sending. This allows time for more records to arrive. Setting a non-zero lingerMs will trade off some
       latency for potentially better throughput due to more batching (and hence fewer, larger requests).
@param retryBackoffMs An artificial delay time to retry the produce request upon receiving an error. This avoids
       exhausting all retries in a short period of time.
@param retryBackoffMaxMs The upper bound of the retry backoff time.
@param deliveryTimeoutMs An upper bound on the time to report success or failure on record delivery
@param metrics The metrics
@param metricGrpName The metric group name
@param time The time instance to use
@param apiVersions Request API versions for current connected brokers
@param transactionManager The shared transaction state object which tracks producer IDs, epochs, and sequence
                          numbers per partition.
@param bufferPool The buffer pool
clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java