Delivery, ordering, and reconciliation
Design clients for atomic outbox writes, at-least-once events, sequence gaps, reconnect, and ambiguous mutations.
Write path
- The API validates the principal, exact scope, resource policy, bounds, and expected versions.
- The domain change and durable outbox record commit atomically in MongoDB.
- A worker later publishes authorized realtime and webhook projections.
- Consumers deduplicate stable identities and reconcile a channel sequence gap through REST.
What is and is not guaranteed
| Property | Boundary |
|---|---|
| Durable mutation + event intent | Atomic inside the owning transaction/outbox boundary |
| Event delivery | At-least-once; duplicates are possible |
| Channel ordering | Monotonic eventSequence for promised durable channel events |
| Presence and typing | Ephemeral, TTL-bound, best-current-state only |
| Client offline writes | Not persisted or automatically replayed by the released SDKs |
| Exactly-once processing | Not claimed; consumers use deduplication and reconciliation |
Ambiguous mutation outcome
Sequence gap or stale subscription
- Stop treating local channel continuity as authoritative.
- Use the SDK recovery result or the documented current-state REST reads.
- Merge confirmed entities by their independent versions and apply tombstones.
- Resume event processing only from the server-acknowledged recovered baseline.