Documentation
¶
Overview ¶
Package outbox implements the transactional outbox pattern (ADR-016 §Class 2). Events are written inside the caller's transaction so a business-write rollback atomically prevents the event from being enqueued — no two-phase commit needed.
The table lives in the shared public schema (same as public.tenants) so one pool serves all tenants. The worker (future session) polls with SELECT … FOR UPDATE SKIP LOCKED and processes rows per topic.
Index ¶
Constants ¶
const NotifyChannel = "outbox_notify"
NotifyChannel is the Postgres LISTEN/NOTIFY channel the engine signals after a successful Enqueue and that the worker (cmd/appximo-worker) LISTENs on. The NOTIFY is only a wake-up HINT: the worker still polls public.outbox, which is the durable source of truth, because a notification emitted while the worker is down is lost forever (NOTIFY is ephemeral, not queued). Keep this constant the single source of truth shared by engine and worker so the two never drift.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.