Flink 实战问题(五):The transaction timeout is larger than the maximum value allowed by the broker

Flink 实战问题(五):The transaction timeout is larger than the maximum value allowed by the broker,第1张

一、背景

设置kafka producer为Semantic.EXACTLY_ONCE会报Unexpected error in InitProducerIdResponse; The transaction timeout is larger than the maximum value allowed by the broker (as configured by max.transaction.timeout.ms)

二、分析并解决

1、查看官方文档,broker最大超时时间是15分钟

2、查看producer默认时间是1小时

broker最大超时时间是15分钟,而producer默认是1小时,不允许超过15分钟,我们解决办法是调整producer的时间:

setProperty("transaction.timeout.ms", "300000");//5分钟

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/langs/919638.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-16
下一篇2022-05-16

发表评论

登录后才能评论

评论列表(0条)

    保存