DE Mastery GitHub

Apache Flink · FLK-07

Process functions — timers, keyed state & broadcast rules

From your world. a dynamic business rule applied to a session of events, where the rule can change over time and must be applied as of each event

Practice quiz with instant feedback. For a scored run that counts toward your local progress, use uv run de quiz FLK-07.

1Which primitives does a KeyedProcessFunction give you? A windowed aggregation hides these primitives.
2How do you implement a session timeout (end the session after a gap of inactivity) with a process function?
3What is broadcast state used for?
4Events and a broadcast rule stream are independent inputs. Why can the evaluation of each event against 'whatever rule is in state now' be non-deterministic?
5The business says 'a transaction is judged by the fraud policy in force on its date'. How do you implement this with a broadcast rule stream?
6A session has timed out and onTimer fires. What should the function typically do?
7Why do you prefer event-time timers to processing-time timers for business logic such as session timeouts and rule application? (choose all) (select all that apply)
8In a KeyedBroadcastProcessFunction, processElement has a ReadOnlyContext for the broadcast state. processBroadcastElement has a read-write Context. Why?