
设置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分钟
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)