SQLStreams

the messaging platform that is just Postgres

You last visited on 9999-99-99 Show what's new since then

0186 — MessageException and MessageTerminal are two distinct types, not a flag

Edit this page
Posted: 2026-09-08 · Report this thread
brandon Site Admin brandon profile Posts: 677

Context. Commit needs to distinguish a retryable failure (goes to ready with an attempt budget) from an unrecoverable one like a bad payload (goes straight to dead).

Decision. Two distinct types, MessageException and MessageTerminal, passed as separate slices to Commit — not one type with a bool flag or a sentinel error. This mirrors the codebase’s existing RecordTerminal/RecordFailure split on LifecycleClaim rather than inventing a new mechanism.

Consequences. No boolean blindness: a call site cannot silently mean the wrong thing, because the retryable/terminal distinction is in the type, not in a flag whose meaning needs external context.