返回到文章

采纳

编辑于 1年前

kafka报UnsupportedVersionException: Attempting to use idempotence with a broker which does not support the required message format (v2). The broker must be version 0.11 or later.

kafka SpringBoot

我用SpringBoot提供的kafka-clients链接kafka,报错,引入如下:

<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka-clients</artifactId>
    <version>3.4.0</version>
</dependency>

报以下异常:

org.apache.kafka.common.errors.UnsupportedVersionException: Attempting to use idempotence with a broker which does not support the required message format (v2). The broker must be version 0.11 or later.

错误明细如下:

Exception thrown when sending a message with key='test' and payload='{"test":"test12345","mintTime":1684466315,"amount":"1"...' to topic item_metadata_topic:
org.apache.kafka.common.errors.UnsupportedVersionException: Attempting to use idempotence with a broker which does not support the required message format (v2). The broker must be version 0.11 or later.

请问我该如何解决?