Kafka Exception UnsupportedForMessageFormatException
org.apache.kafka.common.errors.UnsupportedForMessageFormatException
Non-retriable
Producer
The message format version does not support the requested function. For example, if idempotence is requested and the topic is using a message format older than 0.11.0.0, then this error will be returned.
Common Causes
- log.message.format.version on the broker is set to an old value (e.g., 0.10.0) while the producer is using a feature requiring a newer magic byte (e.g., idempotent/transactional production)
- Topic was created when broker was on an older version and inherited an old message format; broker was upgraded but format version not bumped
- Producer using record headers or exactly-once semantics against a topic with message.format.version < 0.11
Solutions
- After completing a full cluster upgrade, update log.message.format.version to the new broker version in server.properties and perform a rolling restart
- Per-topic override on older clusters that still use this setting: kafka-configs.sh --bootstrap-server localhost:9092 --entity-type topics --entity-name <topic> --alter --add-config message.format.version=<new-version>
- Ensure the upgrade sequence is followed: upgrade all brokers first, then bump inter.broker.protocol.version, then bump log.message.format.version
Example Stack Trace
org.apache.kafka.common.errors.UnsupportedForMessageFormatException: The message format version on the broker does not support the request.Diagnostic Commands
# Check topic message format version
kafka-configs.sh --bootstrap-server localhost:9092 --entity-type topics --entity-name <topic> --describe | grep message.format
# Check broker protocol version settings
kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-default --describe | grep -E 'log.message.format|inter.broker.protocol'Related
Protocol error: UNSUPPORTED_FOR_MESSAGE_FORMAT (code 43)
Related Producer exceptions: BufferExhaustedException · InvalidProducerEpochException · OutOfOrderSequenceException · RecordBatchTooLargeException · RecordTooLargeException · TransactionAbortedException · UnknownProducerIdException
Hitting
UnsupportedForMessageFormatException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.