{
  "id": "kafka/unsupported-for-message-format",
  "signature": "org.apache.kafka.common.errors.UnsupportedForMessageFormatException: The message format version does not support the requested feature",
  "signature_zh": "org.apache.kafka.common.errors.UnsupportedForMessageFormatException: 消息格式版本不支持请求的功能",
  "regex": "UnsupportedForMessageFormatException.*message format version does not support",
  "domain": "kafka",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "Broker or topic uses an older message format (e.g., v0 or v1) that lacks support for features like headers, timestamps, or idempotent writes.",
  "root_cause_type": "generic",
  "root_cause_zh": "代理或主题使用较旧的消息格式（如v0或v1），缺少对头部、时间戳或幂等写入等功能的支持。",
  "versions": [
    {
      "version": "Kafka 2.8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Kafka 3.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Kafka 3.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Set enable.idempotence=false in producer",
      "why_fails": "Disabling idempotence may work but loses exactly-once semantics; feature still unsupported at broker level.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    },
    {
      "action": "Change message.format.version to a higher value in producer config",
      "why_fails": "Producer-side config does not override broker/topic message format; broker must be upgraded.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Delete and recreate the topic with default settings",
      "why_fails": "Default settings may still use old format if cluster is not upgraded; also causes data loss.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Upgrade the topic's message format version to v2 using kafka-topics.\nCommand:\nkafka-topics --bootstrap-server localhost:9092 --alter --topic my-topic --config message.format.version=2.8\nVerify:\nkafka-topics --bootstrap-server localhost:9092 --describe --topic my-topic\nIf using older Kafka version (< 2.8), upgrade the entire cluster first.",
      "success_rate": 0.9,
      "how": "Upgrade the topic's message format version to v2 using kafka-topics.\nCommand:\nkafka-topics --bootstrap-server localhost:9092 --alter --topic my-topic --config message.format.version=2.8\nVerify:\nkafka-topics --bootstrap-server localhost:9092 --describe --topic my-topic\nIf using older Kafka version (< 2.8), upgrade the entire cluster first.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Set inter.broker.protocol.version to match the cluster version and ensure all brokers are on the same version.\nIn server.properties:\ninter.broker.protocol.version=3.2\nlog.message.format.version=3.2\nThen rolling restart brokers.",
      "success_rate": 0.85,
      "how": "Set inter.broker.protocol.version to match the cluster version and ensure all brokers are on the same version.\nIn server.properties:\ninter.broker.protocol.version=3.2\nlog.message.format.version=3.2\nThen rolling restart brokers.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Upgrade the topic's message format version to v2 using kafka-topics.\nCommand:\nkafka-topics --bootstrap-server localhost:9092 --alter --topic my-topic --config message.format.version=2.8\nVerify:\nkafka-topics --bootstrap-server localhost:9092 --describe --topic my-topic\nIf using older Kafka version (< 2.8), upgrade the entire cluster first.",
    "Set inter.broker.protocol.version to match the cluster version and ensure all brokers are on the same version.\nIn server.properties:\ninter.broker.protocol.version=3.2\nlog.message.format.version=3.2\nThen rolling restart brokers."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://kafka.apache.org/documentation/#message_format",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-03-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}