{
  "id": "kafka/rebalance-protocol-mismatch",
  "signature": "org.apache.kafka.common.errors.RebalanceInProgressException: Rebalance in progress; cannot complete assignment",
  "signature_zh": "org.apache.kafka.common.errors.RebalanceInProgressException: 正在重平衡，无法完成分配",
  "regex": "RebalanceInProgressException.*Rebalance in progress",
  "domain": "kafka",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "Consumer group protocol mismatch between static membership and dynamic assignment triggers rebalance loop.",
  "root_cause_type": "generic",
  "root_cause_zh": "消费者组的静态成员和动态分配协议不匹配，导致重平衡循环。",
  "versions": [
    {
      "version": "3.5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Restarting does not resolve protocol mismatch; rebalance triggers again on rejoin.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Longer timeout delays detection but does not fix assignment logic.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Removing static membership may cause duplicate assignments and offset commits.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Set 'partition.assignment.strategy' to 'org.apache.kafka.clients.consumer.RangeAssignor' and ensure all consumers use the same protocol version.",
      "success_rate": 0.8,
      "how": "Set 'partition.assignment.strategy' to 'org.apache.kafka.clients.consumer.RangeAssignor' and ensure all consumers use the same protocol version.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Disable static group membership by removing group.instance.id from consumer config and rebalance with 'KafkaConsumer#enforceRebalance'.",
      "success_rate": 0.85,
      "how": "Disable static group membership by removing group.instance.id from consumer config and rebalance with 'KafkaConsumer#enforceRebalance'.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Upgrade broker to 3.7+ and enable cooperative rebalance protocol with 'CooperativeStickyAssignor'.",
      "success_rate": 0.9,
      "how": "Upgrade broker to 3.7+ and enable cooperative rebalance protocol with 'CooperativeStickyAssignor'.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "设置 'partition.assignment.strategy' 为 'org.apache.kafka.clients.consumer.RangeAssignor'，并确保所有消费者使用相同的协议版本。",
    "从消费者配置中移除 group.instance.id 以禁用静态成员，并使用 'KafkaConsumer#enforceRebalance' 触发重平衡。",
    "升级代理到 3.7+ 并使用 'CooperativeStickyAssignor' 启用协作式重平衡协议。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://kafka.apache.org/documentation/#consumerrebalance",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-02-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}