A prerequisite for using event time processing is setting the right time
characteristic. That setting defines how data stream sources behave (for
example, whether they will assign timestamps), and what notion of time should
be used by window operations like KeyedStream.timeWindow(Time.seconds(30)).
You can set the time characteristic using
Note that in order to run this example in event time, the program needs to
either use sources that directly define event time for the data and emit
watermarks themselves, or the program must inject a Timestamp Assigner &
Watermark Generator after the sources. Those functions describe how to access
the event timestamps, and what degree of out-of-orderness the event stream
Where to go next?
Generating Watermarks: Shows how to write timestamp assigners and watermark generators, which
are needed for event-time aware Flink applications.