Search code examples
scalaapache-kafkaapache-flinkflink-streamingflink-cep

flink sliding window will consider duplicate message?


suppose I am using event time processing and in sliding windows time window 10 and sliding factor 5 seconds.

so now for example some message arrive at 8 seconds event time so it will fall in first

 window-1  1 to 10. 

now it slides 5 seconds and now that window is 5 to 15. so the same messsage which window1 have consider , window2 will also consider that message.

  window2- 5 to 15

so my question is that not duplicate message it will affect my calcualtion ? suggest me I am thinking ok or not? and if it consider bothe messages then how to consider it as unique?


Solution

  • A record is added to all sliding windows that overlap with its timestamp, e.g., in your example, the record at time 8 will be added to both windows 1 to 10 and 5 to 15.