In Flink DataStream API, set .allowedLateness(Time.minutes(<n>)) on a WindowedStream to extend the window lifetime for late records after the watermark passes.
Optionally configure a side output for records that arrive after even the allowed lateness has expired, using .sideOutputLateData(lateOutputTag).
In Flink SQL, add INTERVAL '<n>' MINUTE to the WATERMARK declaration to control the acceptable event-time skew before records are considered late.
In Kafka Streams, configure a grace period on the window definition (TimeWindows.ofSizeAndGrace) to accept records arriving slightly after the window boundary.
In ksqlDB, use the GRACE PERIOD clause in windowed aggregations to hold windows open for late records.
Monitor the late-records side output or dropped-records metric to tune the lateness parameters.
Known gotchas
Allowed lateness in Flink causes the window state to be held longer in memory; very large lateness values can significantly increase memory usage for high-cardinality key spaces.
Records dropped due to being beyond allowed lateness are silently discarded unless you configure a side output; always instrument late-data monitoring in production.
In Kafka Streams, late records beyond the grace period are not emitted into the window aggregate and not logged as errors by default — test explicitly to confirm they are handled as expected.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp