Hi, I want to achieve the following using event time session windows: 1. When the window.getStart() and last event timestamp in the window is greater than MIN_WINDOW_SIZE milliseconds, I want to emit a message "Window started @ timestamp". 2. When the session window ends, i.e. the watermark passes lasteventTimestamp + inactivityPeriod, I want to emit a message "Window ended @ timestamp".
It is guaranteed that all events are on time and no lateness is allowed. I am having difficulty implementing both 1 and 2 simultaneously. I am able to implement point 1 using a custom trigger, which checks if (lastEventTimestamp - window.getStart()) > MIN_WINDOW_SIZE and triggers a customProcessWindowFunction(). However, with this architecture I can't detect the end of the window. Is my approach correct or is there a completely different method to achieve this? Thanks, Manas Kale