kafka protocol_error ai_generated true

org.apache.kafka.common.errors.UnsupportedVersionException:代理不支持所需的API版本

org.apache.kafka.common.errors.UnsupportedVersionException: The broker does not support the required API version

ID: kafka/unsupported-version-broker-api

其他格式: JSON · Markdown 中文 · English
90%修复率
85%置信度
1证据数
2023-04-15首次发现

根因分析

Kafka客户端请求了代理不支持的API版本,通常是由于客户端与代理版本不匹配。

English

Kafka client requests an API version that the broker does not support, often due to mismatched client-broker versions.

generic

官方文档

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

解决方案

  1. Update the Kafka client library to match the broker version. For example, if broker is 3.4.0, use kafka-clients 3.4.0 in your project.
  2. Set inter.broker.protocol.version in broker config to match the older version if client cannot be upgraded immediately.

无效尝试

常见但无效的做法:

  1. 70% 失败

    Upgrading only the client without checking broker version compatibility

  2. 60% 失败

    Manually setting api.version.request=false in client config, which can cause silent failures