Examples Search docs

Queue, timer, outbox

Deferred work is where “it worked on my machine” goes to die. Prove lease and restart semantics explicitly.

Must-pass cases

CaseAssert
Enqueue + lease + completeHappy path
Lease expiry + re-leasePrevious complete fails closed (stale fence)
Idempotent consumerDuplicate delivery → one external effect
Stage in commitCrash after commit still delivers at-least-once
Crash before commitNo phantom dispatch
Timer once-after-restartDeadline fires once; no double-fire
Cron/scheduleDeterministic with virtual Clock

Transactional staging

Domain events + staged queue/timer/outbox rows commit atomically. Network I/O is after commit. Tests should kill the process in both windows.

Clock

Use virtual Clock — wall sleeps make CI flaky and hide bugs.

Queue port · Clock · EventStore · Durability