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

- **ID:** `kafka/unsupported-version-broker-api`
- **领域:** kafka
- **类别:** protocol_error
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

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

## 解决方案

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.
   ```

## 无效尝试

- **** — Upgrading only the client without checking broker version compatibility (70% 失败率)
- **** — Manually setting api.version.request=false in client config, which can cause silent failures (60% 失败率)
