Why are we getting UnsupportedVersionException: The broker does not support INIT_PRODUCER_ID, after Helidon MP 3.2.1 upgrade

huangapple go评论94阅读模式
英文:

Why are we getting UnsupportedVersionException: The broker does not support INIT_PRODUCER_ID, after Helidon MP 3.2.1 upgrade

问题

这似乎与Kafka客户端的一个传递性依赖变化有关。我们通过指定enable.idempotence=false来解决了这个问题,这似乎是一个可行的解决方法。

英文:

We are migrating our code base to Helidon MP 3.2.1 and are noticing that our Kafka consumers are throwing this exception:

org.apache.kafka.common.errors.UnsupportedVersionException: The broker does not support INIT_PRODUCER_ID

This seems to be related to a transitive dependency change for Kafka Clients. We are able to get around this issue by specifying enable.idempotence=false, for which the default seems to have been changed for that Kafka client.

Question: is this the right way to get passed this problem?

答案1

得分: 1

这是新版Kafka客户端与旧版Kafka代理的已知问题KIP-679,该问题默认启用了与旧版本不兼容的客户端功能。解决方法是使用enable.idempotence: false显式禁用生产者幂等性。

异常:

org.apache.kafka.common.errors.UnsupportedVersionException: 代理不支持INIT_PRODUCER_ID

解决方法:

enable.idempotence: false

消息连接器配置示例:

mp.messaging:
 connector:
   helidon-kafka:
     enable.idempotence: false
     bootstrap.servers: ${oci.test-stream.endpoint}:${oci.test-stream.port}
     ...
英文:

This is a known issue of new Kafka client with older versions of Kafka broker KIP-679 which enabled backward incompatible client feature by default. Workaround is explicitly disabling producer idempotence with enable.idempotence: false

Exception:

org.apache.kafka.common.errors.UnsupportedVersionException: The broker does not support INIT_PRODUCER_ID

Workaround:

enable.idempotence: false

Messaging connector config example:

mp.messaging:
 connector:
   helidon-kafka:
     enable.idempotence: false
     bootstrap.servers: ${oci.test-stream.endpoint}:${oci.test-stream.port}
     ...

huangapple
  • 本文由 发表于 2023年5月17日 17:59:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/76270847.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定