2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > 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

时间:2023-01-13 15:06:38

相关推荐

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

一、背景

设置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分钟

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。