An order is placed at 11:59:58. The service that consumes it picks it up at 12:00:04, four seconds and one calendar day later. Whether that order counts toward Monday or Tuesday depends entirely on which clock the window is keyed to. Nothing in the record's payload changes; only the choice of timestamp moves it. That choice is the real boundary between streaming and batch work, and it has very little to do with how fast the pipeline runs.
Kafka's Streams documentation names three clocks. Event time is when the event actually happened at the source. Processing time is when an application consumes the record. Ingestion time is when the broker appends the record to a topic partition. The docs note that processing time may be milliseconds, hours, or days later than the original event time. That range illustrates how wide the gap can grow; it is offered as a qualitative example, with no latency target or capacity-planning figure attached. Kafka also treats the event stream as something that stays available after consumption, with retention configured per topic. That is what makes replay possible at all.
All three are defensible, but they answer different questions. Windows keyed to processing time align with the machine's wall clock, which suits a metric about load on the service itself. Windows keyed to event time align with when things happened, which is what a business report needs. The gap between the two is where the trouble lives.
| Clock | Timestamp source | Where it can mislead |
|---|---|---|
| Event time | Moment the event occurred at the source | Needs buffering for records that arrive after the window closed |
| Ingestion time | Broker append into the topic partition | Tracks pipeline arrival, not the action that produced the event |
| Processing time | Consuming application's wall clock | Slides events across window boundaries under load |
Tyler Akidau, writing in 2015, argued that unbounded and bounded are the terms that actually describe a dataset; streaming and batch describe how it gets processed. The distinction matters because an unbounded dataset can never be declared complete at any instant. Since arrival order rarely matches occurrence order, a processing-time window will place some events in the wrong bucket. Akidau stated the model claim with care: well-designed streaming systems provide a strict superset of batch functionality, modulo perhaps an efficiency delta. The qualifier is doing real work. The claim concerns expressive power inside a model, with no benchmark attached that would rank streams above batch engines.
Event time solves the bucket problem only if something declares when a window is ready to close. Flink's documentation defines a watermark for time t as an assertion that the stream is probably complete up through time t. That word carries the whole design. A watermark says when to stop waiting for earlier events; it remains a statement of probable completeness, leaving room for records that surface afterwards. Akidau's later writing on the Dataflow model separates perfect watermarks, which are strict, from heuristic ones, which estimate and therefore admit late data. It also splits trigger from accumulation: one decides when a window's output materialises, the other decides how repeated outputs from the same window relate. The choice trades how long results are held back against how complete they are at emission. Late records can travel to side outputs or update results already emitted.
Does this make event time the automatic winner? Flink's own guidance points the other way. Its processing-time mode, driven by the machine's wall clock, can suit applications with strict low-latency requirements that tolerate approximate results. A signal that must fire inside a tight bound may accept a little imprecision in exchange for speed. The same event-time semantics that serve a late-arriving report also apply to recorded data, which is how Flink arrives at accurate and consistent results whether events are live or stored. Batch engines keep earning their place; Akidau noted that they have long been used on continuously arriving data too. The honest position is that choosing a clock is a design decision with a cost, and different jobs pay different costs.
That cost is what the Kappa argument targets, though the target is often misread. Jay Kreps, writing in 2014, described the pain of Lambda plainly: maintaining code that must produce the same result in two complex distributed systems is as painful as it sounds. The duplication lives in the two implementations, both of which have to keep agreeing. Kappa keeps the complete log in a system such as Kafka and, when reprocessing is needed, starts a second instance of the same code from the beginning of the retained data, writes into a new output table, and switches reads once the new job has caught up. Retention has to cover the window being replayed.
Kreps was candid about the price. He called the efficiency and resource trade somewhat of a wash, and noted that reprocessing needs roughly twice the output storage while a new job runs alongside the old one, with storage that can absorb sustained high-throughput writes. The payoff is a single code path: one place to fix a bug, one place to verify a result. Nothing in the argument claims Kappa is cheaper or faster than Lambda, and Kreps did not present it as the industry default. The benefit sits in maintenance: only one implementation needs to be reasoned about. Two implementations that must keep matching carry a standing cost. Kafka's platform description supports this shape, since events are retained and can be handled as they occur or replayed later.
Where does a mini-program platform sit in this picture? Mostly in the architecture. A shared runtime and an open catalog let one capability reach several host surfaces, and a durable, replayable log behind them gives a team a single place to fix how events are timestamped. These are structural connections; no measured outcome is being claimed here. None of the sources reviewed reports an end-to-end delay or an out-of-order rate for a specific mini-program, and inventing one would repeat the mistake of treating Kafka's time-range illustration as a service guarantee. The useful takeaway stays modest: choose the clock deliberately, treat the watermark as an assertion with a failure mode, and keep one code path when replay belongs in the plan. Cross Mini App is built around that last idea.