Hi
Thank you for posting query in Microsoft Q&A Platform.
Yes, your understanding of the Session Window function in Stream Analytics is correct.
The check for maximum duration violations is based on the time when the first session window opened. In your example, if the first event came in at t=0 and a session window was started with a timeout of 5 minutes and a max duration of 10, then a check for maximum duration violations will be done at t=10.
If a new event comes in at t=13 and a new session window starts, then the next event comes in at t=15 and then at t=20, a check for maximum duration violations will be done at t=20. Since the window has been open for only 7 minutes, the window will continue beyond until the next check at t=20. If more events come in, then the window size can exceed 10 minutes.
It's important to note that the maximum duration checking intervals are set to be the same size as the specified max duration. So, in your example, the checks on if the window exceeds maximum duration will happen at t=0, 10, 20, 30, etc. This means that the actual duration of a session window could then be up to twice maxDuration.
I hope this helps! Let me know if you have any further questions.