conduktor.io ↗

Kafka Exception RecordBatchTooLargeException

org.apache.kafka.common.errors.RecordBatchTooLargeException
Non-retriable Producer

This record batch is larger than the maximum allowable size

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.common.errors.RecordBatchTooLargeException: The request included message batch larger than the configured segment size on the server.

Diagnostic Commands

# Check topic segment configuration kafka-configs.sh --bootstrap-server localhost:9092 --entity-type topics --entity-name <topic> --describe | grep segment # Describe broker-level configuration kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-name <broker-id> --describe | grep -E 'segment|request.size'

Related

Protocol error: RECORD_LIST_TOO_LARGE (code 18)

Related Producer exceptions: BufferExhaustedException · InvalidProducerEpochException · OutOfOrderSequenceException · RecordTooLargeException · TransactionAbortedException · UnknownProducerIdException · UnsupportedForMessageFormatException

Hitting RecordBatchTooLargeException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.