I want to calculate the time difference between two non consecutive event in Apache Flink. An Event consists of a name and a timestamp. Ex:
E1("A", timestamp) -> E2("B", timestamp) -> E3("C", timestamp)
In this case I want to calculate the timestamp difference between E3 and E1. Any ideas on how to make it work in Flink?