Duplicated messages reading via flink savepoints

243 Views Asked by At

I'm trying to use Apache Flink 1.6.0 to read some messages from a kafka topic, transform them and finally send them to another kafka topic. I use savepoints to save the state of the application in case of cancellation and restating. The problem is that I have duplication in reading the messages after restart. The kafka version is 011. Thanks for any helpful comment.

1

There are 1 best solutions below

2
On

To avoid duplicates, it's necessary to pass Semantic.EXACTLY_ONCE when setting up the kafka producer. See the documentation for more details concerning data loss and duplication when working with Kafka.