Re: Stopping a kafka consumer gracefully (no losing of inflight events, StoppableFunction)
Posted by
Till Rohrmann on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Stopping-a-kafka-consumer-gracefully-no-losing-of-inflight-events-StoppableFunction-tp18418p18486.html
Hi Christophe,
yes I think you misunderstood the thread. Cancel with savepoint will never cause any data loss. The only problem which might arise if you have an operator which writes data to an external system immediately, then you might see some data in the external system which originates from after the savepoint. By implementing the interaction with the external system, for example only flush on notify checkpoint complete, you can solve this problem. The bottom line is that if you don't do it like this, then you might see some duplicate data. The Kafka exactly once sink, for example, is implemented such that it takes care of this problem and gives you exactly once guarantees.
Cheers,
Till