What is Event Time?
Event Time is one of the three time semantics in Apache Flink, along with Ingestion Time and Processing Time. Event Time refers to the time at which each individual event actually occurred, typically extracted from the event itself. This contrasts with Processing Time, which refers to the time at which events are processed by the Flink system, and Ingestion Time, which is the time at which events enter the Flink pipeline.
Source: Apache Flink
Key Features of Event Time:
Timestamp Extraction: In Event Time, each event must have a timestamp that indicates when the event occurred. This timestamp is extracted from the event data itself.
Watermarks: Watermarks are a mechanism used to track progress in Event Time. They are special timestamps that indicate that no events with a timestamp older than the watermark should be expected. Watermarks allow Flink to handle late-arriving data and trigger computations when it is safe to assume all relevant data has been processed. For more detailed information, you can refer to the Understanding Watermarks in Apache Flink
Windowing: Event Time is crucial for windowed operations. Windows (e.g., tumbling, sliding, session windows) in Flink can be defined based on Event Time, ensuring that events are grouped according to when they actually occurred.
Read on →