Expand description
The Postgres side of domain events (ADR-0018 § 4): the outbox the relay reads, the db
transport (entregas_eventos) and the dead-letter sink every transport writes to. The tables
are migrations/outbox.sql, which puerto new --eventos writes into the project.
Structs§
- Descartados
Postgres descartados, whatever the transport. Recording the same event for the same consumer twice keeps the first record (descartados_evento_consumidor).- Entregas
Postgres - The relay’s publisher on the
dbtransport: fans each event out to the consumers subscribed to its type and marks it published, in one transaction. - Outbox
Postgres - The outbox, as the relay reads it.
- Suscripcion
Postgres - One consumer’s input on the
dbtransport.
Constants§
- CLAVE_
BLOQUEO_ RELAY - The advisory lock the relay holds: only one worker replica relays, so the outbox order is
kept. The bytes of
"puerto". - RESERVA_
POR_ DEFECTO - How long a claimed delivery stays invisible to other claims. A worker that dies while handling one leaves it due again after this — at-least-once, never lost.