Share via

When does Azure Stream Analytics watermark calculation use 'no events arrived' formula

Dhruv Singla 230 Reputation points
2026-03-07T10:28:39.4666667+00:00

The azure documentation for time handling in azure stream analytics states the following.

  • When there's any incoming event, ...
  • When there's no incoming event, ...

I have the following doubts

  1. In the statement 'When there's no incoming event', who determines the 'when'? Like is the watermark calculation done after every x seconds?
  2. Suppose the last event which arrived at Azure Stream Analytics was 5 minutes ago. Would ASA use 'incoming event' formula or 'no incoming event' formula?
Azure Stream Analytics
Azure Stream Analytics

An Azure real-time analytics service designed for mission-critical workloads.

0 comments No comments

Answer accepted by question author
  1. SAI JAGADEESH KUDIPUDI 2,210 Reputation points Microsoft External Staff Moderator
    2026-03-13T12:26:29.5233333+00:00

    Hi **Dhruv Singla,
    **
    Azure Stream Analytics decides when to use the “no incoming events” watermark formula based on the late arrival tolerance window, not on a fixed periodic timer and not on window definitions. While events are arriving, the watermark advances using event time (largest event time seen minus the out-of-order tolerance). When events stop arriving, the engine waits until the late arrival tolerance window elapses since the last observed event. After that point, ASA considers the input idle and advances the watermark using the current wall-clock time minus the late arrival tolerance window. In practice, if the last event arrived 5 minutes ago and the late arrival tolerance is smaller than that gap, ASA switches to the “no incoming event” formula and advances the watermark accordingly. This logic applies even if the query has no windows; windows only consume the watermark to decide when results can be finalized, they do not control when the watermark moves.

    Reference Link :
    Understand time handling in Azure Stream Analytics

    Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.

    If you feel that your quires have been resolved, please accept the answer by clicking the "Upvote" and "Accept Answer" on the post.


1 additional answer

Sort by: Most helpful
  1. Marcin Policht 86,615 Reputation points MVP Volunteer Moderator
    2026-03-07T12:01:00.4633333+00:00

    The "when" in the phrase "When there's no incoming event" is determined by the internal event processing logic of Azure Stream Analytics (ASA). It doesn't depend on an arbitrary fixed time interval but instead on the event arrival pattern and the concept of a watermark.

    The watermark in ASA is a mechanism that tracks the latest point in time that the system can process data reliably. The system uses this watermark to ensure that events arriving late can be handled appropriately. ASA maintains a watermark based on incoming events, typically advancing it when new events are processed. If there is a gap in incoming events (i.e., no event has arrived within the configured idle timeout), ASA will use the "no incoming event" logic to calculate the watermark. This typically happens after the configured idle timeout has passed, which is set using a TumblingWindow or HoppingWindow with the Watermark policy in ASA.

    In your example, where the last event arrived 5 minutes ago, ASA will use the "no incoming event" formula if the idle timeout (the period where no new events have been received) exceeds the specified threshold. This timeout is configurable in the ASA job settings. So, if the configured idle timeout is, say, 2 minutes, and the last event was 5 minutes ago, ASA would treat this situation as "no incoming event" and apply the appropriate watermark calculation, marking the end of processing for the current time window.

    The watermark calculation doesn't automatically happen after every fixed time period. Instead, it is driven by the absence of events and the specific configurations like event arrival rate, idle timeout, and windowing functions.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.