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.tim
·
一、背景
设置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分钟
更多推荐
已为社区贡献3条内容
所有评论(0)