conduktor.io ↗
← All errors
high PostgreSQL MySQL SQL Server MongoDB MariaDB Resources

org.apache.kafka.common.errors.RecordTooLargeException: The message is N bytes when serialized which is larger than 1048576

Root cause

The serialized record or batch exceeds an effective producer, broker or topic size limit. Embedded schemas and large columns can increase size; no fixed expansion ratio applies.

How to fix

  1. Measure serialized uncompressed records and compressed batches, then review producer.override.max.request.size, broker message.max.bytes and topic max.message.bytes together.
  2. Connector producer overrides depend on connector.client.config.override.policy and the worker distribution. Review the specific override policy instead of enabling every override automatically.
  3. Exclude or externalize large columns only if downstream requirements allow it. Raising limits increases memory and request costs.

Recovery guidance reviewed 2026-10-27 against v3.7.0.Final.

Official Debezium documentation ↗