Reads a marker by id.
The marker id
The marker, or undefined when none exists
Creates a parked marker, outside any transaction.
The parked marker
'applied', or 'exists' when a marker was already present
Lists parked markers, never reading their envelopes.
Maximum markers returned
The parked markers, without envelope
Deletes rows of every status — processed, discarded, attempting and
parked — last written before before, at most limit per status. A
parked marker is purged like any other, so no row outlives the window
while the caller's purge rate keeps up with inflow.
Epoch milliseconds; rows with updatedAt < before are deleted
Maximum rows deleted per status
The number of rows deleted (a row already gone counts zero)
Records one handler failure on the failure-count row, OUTSIDE any
transaction: creates it with attempts: 1, or increments it.
The delivery's row ids
What to record
The new failure count
Releases a parked marker: retry deletes it and the failure-count row;
discard marks it discarded, clears its envelope and deletes the
failure-count row.
The delivery's row ids
retry or discard
Epoch milliseconds
applied with the marker as it was, missing, or not-parked
Opens ONE transaction, creates the marker in it FIRST, then runs work
with the transaction's unit of work, and commits. Any rejection rolls the
whole transaction back — the marker included — and propagates.
The processed marker to create
The handler, given the unit of work
What work resolved to
Refuses, at startup, a backend that cannot serve the inbox.
A promise that rejects naming why the store cannot serve
The inbox store port.
Every method returns a promise that REJECTS on failure and never throws synchronously. Every read requires
kindto equalINBOX_RECORD_KIND, and a row of anotherkindis treated as missing; a custom store must honour both rules.Since
0.9.0