Apache Kafka RecordTooLargeException (> 1 MB Default)

Producer message exceeded broker `message.max.bytes` (default 1,048,588 bytes).

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: Apache Kafka RecordTooLargeException (> 1 MB Default) Platform: Databases
Common Root Causes:
  • Producer message exceeded broker `message.max.bytes` (default 1,048,588 bytes).

Interactive Diagnostic Checklist

Verified Solutions:
  1. Enable `compression.type=zstd` or store large payloads in S3/MinIO and pass references.
Safe Diagnostic Command:
Inspect serialized payload size
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

Producer message exceeded broker `message.max.bytes` (default 1,048,588 bytes). Recommended diagnostic: `Inspect serialized payload size`. Remediation: Enable `compression.type=zstd` or store large payloads in S3/MinIO and pass references.

Worked Examples

  • Run `Inspect serialized payload size` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-kafka-record-too-large-exception · Independently verified: 2026-11-25

Related Resources