1、kafka集群使用的是SASL/SCRAM-SHA-256认证

sasl-mechanism: SCRAM-SHA-256
security-protocol: SASL_PLAINTEXT
sasl-jaas-config: org.apache.kafka.common.security.scram.ScramLoginModule required username="admin" password="Wisebrain@20210621";

解决方案:
https://stackoverflow.com/questions/67148019/kafka-producer-property-enable-idempotence-true-is-causing-error

搜了一下发现是kafka生产者的幂等性配置导致的
将幂等性配置改为false

enable-idempotence: false
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐