conduktor.io ↗

Kafka Exception RecordTooLargeException

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

This record is larger than the maximum allowable size

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.common.errors.RecordTooLargeException: The request included a message larger than the max message size the server will accept.

Diagnostic Commands

# Check topic message size limits kafka-configs.sh --bootstrap-server localhost:9092 --entity-type topics --entity-name <topic> --describe | grep message.bytes # Check broker message size limits kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-name <broker-id> --describe | grep message.max

Related

Protocol error: MESSAGE_TOO_LARGE (code 10)

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

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