kafka protocol_error ai_generated true

org.apache.kafka.common.errors.UnsupportedVersionException: 代理不支持消费者所需的组协议版本

org.apache.kafka.common.errors.UnsupportedVersionException: The broker does not support the group protocol version required by the consumer

ID: kafka/unsupported-version-join-group

其他格式: JSON · Markdown 中文 · English
88%修复率
84%置信度
1证据数
2024-03-20首次发现

版本兼容性

版本状态引入弃用备注
3.0.0 active
3.3.0 active
3.6.0 active

根因分析

消费者请求的组协议版本(例如2)代理不支持,原因是消费者和代理之间的版本不匹配。

English

Consumer requests a group protocol version (e.g., 2) that broker does not support due to version mismatch between consumer and broker.

generic

官方文档

https://kafka.apache.org/documentation/#upgrade

解决方案

  1. 将消费者的 'group.protocol' 设置为 'classic',并确保代理支持经典协议(Kafka 3.0+)。
  2. 升级代理到支持消费者组协议的版本(例如,升级到3.6以支持消费者协议v2)。
  3. 降级消费者客户端库以匹配代理版本(例如,使用kafka-clients 3.3.0与代理3.3.0)。

无效尝试

常见但无效的做法:

  1. 75% 失败

    Classic protocol may not be supported by older brokers; error persists if broker version is too low.

  2. 90% 失败

    Consumer version mismatch with broker causes unsupported version errors; both must be compatible.

  3. 80% 失败

    Inter-broker protocol version affects broker communication, not consumer group protocol; does not fix consumer-side error.