Arrival is not application order
Follow a two-event stream through a deliberate buffer policy. Distinguish event identity, application order and the evidence left by a lost acknowledgement.
Two envelopes land on a receiver in the order 2, then 1. A chart that numbers the arrival rows 1 and 2 makes the trace easy to scan, but it has not repaired the business sequence. Before adding a queue, decide which ordering matters, who supplies it and what the receiver is allowed to acknowledge. This chapter works through a deliberately small policy so its costs remain visible.
The example is our own two-event stream: packet-alpha carries business sequence 1 and packet-beta carries sequence 2. Those numbers are part of this demonstration’s contract. They are not properties that every webhook, HTTP request or event format provides. The Scenario Workbench lets you reproduce the decisions without a server or an account.
Three orders on one page
Arrival order is what this receiver observed. Application order is the order in which it committed effects. Acknowledgement order is the order of successful acknowledgements recorded by the model. Keep them separate. A lost acknowledgement can leave a committed event absent from the sender’s confirmed set, even when a later event has been confirmed.
Our receiver requires contiguous application sequence: it cannot commit 2 while it still expects 1. An early 2 therefore enters a buffer. The receiver does not invent a missing event, relabel the sequence or silently drop the envelope. When 1 commits, the buffer can release 2. The ledger shows both the early receipt and the later decision; one visible row is never substituted for the other.
| Observation | Receiver action | What the observation establishes |
|---|---|---|
| Sequence 2 arrives while 1 is expected | Retain 2 in the bounded example buffer | Receipt of 2, not application of 1 |
| Sequence 1 commits | Record its identity and effect together | One modelled effect exists |
| Sequence 1 is acknowledged | Record the acknowledgement | This acknowledgement was observed |
| Buffered 2 is released | Commit, then acknowledge 2 | The chosen application policy has been followed |
This table is an original model, not a transport standard. Change the policy and the correct test oracle changes with it. A snapshot replacement might accept only the highest valid version instead. Commutative increments might tolerate different arrival orders. A workflow with irreversible steps may require a stricter gate. Choosing among those designs requires the actual business contract.
Identity does not supply sequence
CloudEvents v1.0.2 defines event identity using the combination of source and ID. That is a scope for recognizing an event; it does not provide the numbered application sequence in this experiment. Using a lexical sort of IDs as a business order adds a rule that the identity format did not promise.
An event timestamp is also not automatically a total order. Its precision, clock source and update semantics matter. As a concrete, attributed example, Stripe’s delivery documentation warns against depending on generation-order delivery and against using its creation timestamp to establish ordering or deduplication. That is a statement about that provider’s documented behavior, not a universal rule for all event systems.
Our model makes the missing contract explicit. Every event has an ID, a payload revision and a business sequence. IDs identify logical events; sequence governs this receiver’s application policy; trace indexes merely locate rows. None of these fields is a customer’s identity, an authentication token or proof that the source is trustworthy.
A buffer is a responsibility
With the exhaustion scenario, sequence 1 never commits. Sequence 2 remains visibly blocked. The experiment ends with an unresolved item instead of a green completion message. This is the useful failure: a queue can retain work but cannot create a missing prerequisite.
A production design would need policies that this in-memory lab deliberately does not implement: retention, durable recovery after restart, buffer size limits, operator escalation, backpressure and a way to reconcile a genuine gap. Decide whether the producer can replay a missing event or whether a current authoritative snapshot is the safer recovery source. Do not replay indefinitely just because a retry button exists.
The finite lab has only two logical events and a small attempt budget. Its bound prevents browser work from growing with an untrusted stream. It does not demonstrate that a real service can retain an arbitrary backlog. The distinction between a bounded teaching model and a durable queue belongs in both the UI and the exported trace.
The same ID can still be suspicious
Run Conflicting event identity. The second envelope claims the first event’s identity but contains a different payload revision. The receiver quarantines it; it neither adds an effect nor acknowledges the conflicting content as the original result. This is a conservative choice for this example, not a substitute for signature verification or a complete schema policy.
Compare that with Duplicate callbacks. An envelope matching the stored identity and payload reuses the recorded outcome. The idempotency chapter explains the transaction boundary that this lab assumes. RFC 9110’s idempotent method semantics concern the intended effect of repeated requests; an arbitrary callback application still has to establish its own safe processing boundary.
A useful five-minute investigation
Start with out-of-order arrival. Read the first two rows, then locate the two commit rows. Export the trace and check that receipt, commit and acknowledgement have separate states. Now switch to exhaustion: the absence of an effect for 1 should explain why 2 stays blocked. Finally choose lost acknowledgement with an attempt budget of one. A committed effect can coexist with an exhausted sender and an absent acknowledgement for that effect.
Those three observations are more informative than counting successful HTTP-like labels. They identify what the model knows and what it cannot conclude. For a real system, write those distinctions into an acceptance test before deciding whether to buffer, replay, reconcile or stop.
Source scope and review
CloudEvents specification v1.0.2 — event context
CloudEvents project / CNCF — primary source. Publication date: undated. Accessed 2026-11-17. Defines the source-plus-id identity scope. It does not supply our model’s business sequence or ordered acknowledgement policy.
Webhook delivery and event handling
Stripe documentation — primary source. Publication date: undated. Accessed 2026-11-17. A concrete provider documents duplicate delivery and lack of guaranteed ordering. Its behavior is not a universal webhook contract.
RFC 9110 — HTTP Semantics
IETF / RFC Editor — primary source. Publication date: 2022-06. Accessed 2026-11-17. Section 9.2.2 defines idempotent method semantics. It does not make an arbitrary application operation idempotent.
The numbered stream, buffer, trace format and tests are original demonstrations. Source references support their stated boundaries; they do not certify this model as a deployed integration.