Status. Proposed design only. Nothing in this vault is DG client approval. No application, service or test has been executed; every scenario is Not executed. Fees and dates are open.

Outbox and worker

Purpose

Reliable immediate email for four business events, without losing or silently duplicating work.

Source notes

Notifications-and-Outbox, Step-01-Foundation (contract), Step-07-Outbox-Worker-Email (worker).

Contract (Proposed)

  • One transaction: business state and its outbox event commit together (T33).
  • The worker claims a durable job (FOR UPDATE SKIP LOCKED, ADR-0002-Outbox-Worker-No-Redis), re-checks that the recipient is currently authorised, sends a minimal email with an authenticated link, and writes a delivery record (sent, failed or skipped).
  • Transient failures retry with bounded backoff. A send timeout can be ambiguous: reconcile, never blindly resend.
  • Delivery is at-least-once with duplicate protection: unique event-recipient-channel key, durable attempt history, provider idempotency where supported. Do not promise exactly-once (T35).
  • Events: new interest, assigned private question, accepted discussion, material revision. Account and security email is separate.
  • Not in Balanced: digests, quiet hours, overdue-email reminders, escalation.
  • Email is generic: no private body or confidential terms; the link re-authorises (T34).
  • If email fails, the in-app record stays available.

Open decisions

Blocked by Q07 (current-recipient and revocation behaviour, failed-delivery handler), Q08.

Scenarios

T33, T34, T35, T36.

Change history

DateChange
2026-10-20Created (bootstrap Phase 2)