Hello everybody, I'm currently trying to implement a Function that allows me to detect that a certain amount of time has passed after receiving the last element of a stream (in a given time window). For example if nothing happened for 6 hours within a given Session I want to do something (set a flag, clear some state).
I thought I could solve this with a custom trigger on EventTime TimeWindows. I'm currently confused about how I should implement that Trigger. The implementation should not be much different from a EventTimeTrigger except that it discards of any windows with more than one element. This would lead to a windowing mechanism that effectively only fires a window after a certain time for the last element. What I don't understand is when the regular EventTimeTrigger purges windows because it only ever returns FIRE and CONTINUE events. I assumed that after firing a window onEventTime the window would get purged eventually. I then would've added a PURGE once the number of elements was greater than 1. Would that be a suitable implementation? Best Regards, Julian