使用Flink提供的 FlinkKafkaProducer 写入kafka数据的时候,相同的代码相同的环境下,Semantic.AT_LEAST_ONCE 策略一切正常,但是当切换到 Semantic.EXACTLY_ONCE 时,flink作业异常如下:
org.apache.kafka.common.KafkaException: Unexpected error in InitProducerIdResponse; The transaction timeout is larger than the maximum value allowed by the broker (as configured by transaction.max.timeout.ms).
at org.apache.kafka.clients.producer.internals.TransactionManager$InitProducerIdHandler.handleResponse(TransactionManager.java:984)
at org.apache.kafka.clients.producer.internals.TransactionManager$TxnRequestHandler.onComplete