ProducerBatch

ProducerBatch is…​FIXME

ProducerBatch is created when:

  • RecordAccumulator is requested to append

  • ProducerBatch is requested to split

Tip

Enable ALL logging level for org.apache.kafka.clients.producer.internals.ProducerBatch logger to see what happens inside.

Add the following line to config/tools-log4j.properties:

log4j.logger.org.apache.kafka.clients.producer.internals.ProducerBatch=ALL

Refer to Logging.

Creating ProducerBatch Instance

ProducerBatch takes the following to be created:

ProducerBatch initializes the internal properties.

split Method

Deque<ProducerBatch> split(int splitBatchSize)

split…​FIXME

Note
split is used exclusively when RecordAccumulator is requested to splitAndReenqueue.

createBatchOffAccumulatorForRecord Internal Method

ProducerBatch createBatchOffAccumulatorForRecord(
  Record record,
  int batchSize)

createBatchOffAccumulatorForRecord…​FIXME

Note
createBatchOffAccumulatorForRecord is used exclusively when ProducerBatch is requested to split.

results matching ""

    No results matching ""