Architecture Decision Record

ADR-0023: Fetch Progress Uses Durable Named Consumers

Status: Accepted · Date: 2026-03-06

Status: Accepted

Date: 2026-03-06

Context

BSFG fetch semantics are unary paged pull. That means progress over a retained stream must be tracked somewhere durable and replayable. The architecture needs a clear answer to:

JetStream consumers are the server-side mechanism that track delivery and acknowledgement state. Durable consumers persist progress on the server, while ephemeral consumers do not persist long-term state and are intended for short-lived use. :contentReference[oaicite:0]{index=0}

Options Considered

Option Description Benefits Drawbacks
Client-only cursor Keep offset and progress only in the client or external database.

|

| | Ephemeral consumers | Create short-lived consumers on demand for each fetch session. |

|

| | Stateless stream reads only | Read raw stream positions directly with no consumer abstraction. |

|

| | Durable named consumers (Selected) | Each logical fetcher uses a stable consumer identity whose progress is persisted server-side. |

|

|

Decision

BSFG fetch progress uses durable named consumers.

FetchFacts(consumer_name, ...)
ConfirmReceipt(consumer_name, ...)

A consumer_name identifies the logical reader whose progress is tracked against the stream. That identity is durable and survives client restarts.

Consequences of this choice:

Consequences

Benefits:

Tradeoffs: