Hello community, I have a question regarding how t...
# troubleshooting
t
Hello community, I have a question regarding how the datastream api works. I have source as Cloud PubSub from topic A, sink also in another PubSub topic B. There is an aggregator operator in the dataflow graph in between these two and window type is tumbling. My question is, how does the acknowledgement mechanism works>? Does
PubSubSource
and
PubSubSink
work in tandem? basically if events "1" , "2", "3", "4" flows from source into an input stream, then we aggregate on top of this stream, when do these events get acknowledged on Source Topic A? Is it when the flow completes and the aggregated message is sinked into Topic B? or in some other way?
a
Flink works on periodic checkpoints and the https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/datastream/pubsub/#sourcefunction documentation states
The PubSubSource will only acknowledge a message on successful checkpoints to guarantee at-least-once. This does mean if the time between successful checkpoints is larger than the acknowledgment deadline of your subscription messages will most likely be processed multiple times.