Hi David, in case of event time, the timeout will be detected when the first watermark exceeding the timeout value is received. Thus, it depends a little bit how you generate watermarks (e.g. periodically, watermark per event).
In case of processing time, the time is only updated whenever a new element arrives. Thus, if you have an element arriving 4 seconds after Event A, it should detect the timeout. If the next event arrives 20 seconds later, than you won't see the timeout until then. In the case of processing time, we could think about registering timeout timers for processing time. However, I would highly recommend you to use event time, because with processing time, Flink cannot guarantee meaningful computations, because the events might arrive out of order. Cheers, Till On Thu, Oct 6, 2016 at 3:08 PM, David Koch <ogd...@googlemail.com> wrote: > Hello, > > With Flink CEP, is there a way to actively listen to pattern matches that > time out? I am under the impression that this is not possible. > > In my case I partition a stream containing user web navigation by "userId" > to look for sequences of Event A, followed by B within 4 seconds for each > user. > > I registered a PatternTimeoutFunction which assuming a non-match only > fires upon the first event after the specified timeout. For example, given > user X: Event A, 20 seconds later Event B (or any other type of event). > > I'd rather have a notification fire directly upon the 4 second interval > expiring since passive invalidation is not really applicable in my case. > > How, if at all can this be achieved with Flink CEP? > > Thanks, > > David > >