admin管理员组

文章数量:1349744

I am using spring-kafka 3.1.9. Logs printed with ProducerFencedException for all commitTransaction and safeproducer was close. Even for AbortTransaction safe producer was close. This was due to Network outage. We are using Spring kafka transaction management with auto commit false, read committed true , we consume in batch from 1 topic process records and send to another topic, our understanding is message should be rollback and consumer should start with previous offset or offset from where transaction is failing. Behavior we saw is send messages were failed but consumer skipped messages. Due to this we lost few messages. As an application developer what is correct way to handle transactions if fatal errors like ProducerFencedException, OutOfSequenceException are thrown, as I can see default behavior is to close producer, but we have seen message lost as transaction coordinator didnot rollback offset. If producers are closed can we loose messages?

本文标签: