kafka protocol_error ai_generated partial

org.apache.kafka.common.errors.UnsupportedCompressionTypeException:不支持的压缩类型。

org.apache.kafka.common.errors.UnsupportedCompressionTypeException: The compression type is not supported.

ID: kafka/unsupported-compression-type

其他格式: JSON · Markdown 中文 · English
85%修复率
87%置信度
1证据数
2024-02-28首次发现

根因分析

代理或客户端收到带有压缩编解码器(例如 lz4、snappy、zstd)的消息,该编解码器在代理配置中未启用或不受支持。

English

The broker or client received a message with a compression codec (e.g., lz4, snappy, zstd) that is not enabled or supported in the broker configuration.

generic

官方文档

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

解决方案

  1. Enable the compression type in broker's server.properties: `compression.type=producer` (auto-detect) or explicitly set `zstd` if using zstd. Then restart the broker. Example: `echo 'compression.type=zstd' >> config/server.properties && kafka-server-stop.sh && kafka-server-start.sh config/server.properties`.

无效尝试

常见但无效的做法:

  1. 75% 失败

    Upgrading the client library without changing broker config (e.g., enabling zstd on broker) still fails because the broker rejects unknown compression.

  2. 60% 失败

    Disabling compression on the producer without fixing the broker may hide the symptom but loses efficiency; the root cause is the broker not supporting the codec.