Hi, if I understand correctly, your problem is that event time does not progress in case you don’t receive events, so you cannot detect the timeout of devices. Would it make sense to have you source periodically send artificial events to advance the watermark in the absence of device events, with a certain gap for which you can safely assume that you will no longer receive events with a smaller timestamp from any device in the future? Because, how else could Flink advance event time without receiving further events?
Best, Stefan > Am 22.06.2017 um 16:35 schrieb Álvaro Vilaplana García > <alvaro.vilapl...@gmail.com>: > > Hi, > > Please, can you help me with a problem? I summarise in the next points, I > hope is enough clear to approach some help. > > > a) We have devices, each with its own ID, which we don’t have control of > > b) These devices send messages, with an internally generated, non-synced > (amongst other devices) timestamp > > c) We want to detect when each devices may stop sending messages > > d) For that, we are using a ProcessFunction > > e) The devices put the messages in a Kafka topic, partitioned by ID. > > f) We are struggling with the ProcessFunction timeout feature: > > We cannot rely on real time (processing time), since the messages from the > devices may be delayed (even if their timestamp does not show these delays) - > so we rely on device timestamps instead. > In our case an event comes in which: "Registers a timer to be fired when the > event time watermark passes the given time". The problem we have is there are > cases where we do not get an additional event after the first event- which > means that the original event timeouts are not triggered. > > As a side note we've seen in unit tests that flink seems to set a watermark > after the last event with a Long.MaxValue (9223372036854775807) - which hides > the above problem. > > I am using Scala 2.11 /Flink versions 1.2.0 > > Regards > -- > ______________________________ > > Álvaro Vilaplana García