Recover an interrupted stream
Preserve the exact opaque cursor when reconnecting an SSE subscription. Catch-up is bounded and may require a fresh application snapshot. Close on refresh-required, and do not retry the same exhausted cursor. A delivered event does not prove durable application processing; design reconciliation and token renewal into the consumer.
Reconnection
Section titled “Reconnection”EventSourceresends the exact last event ID inLast-Event-ID.- The server authenticates the original stream token and binds the cursor to the original topic and table activation. A cursor never grants read access.
- The server replays unacknowledged complete batches from the retained table when it can continue the subscription within its resource limits.
- Replay completes before live delivery resumes. The server skips batches already covered by the cursor.
Do not construct cursors or convert them to numbers. Numeric IDs from the older preview protocol are rejected rather than interpreted as a new subscription. Malformed or foreign cursors fail explicitly. Capacity exhaustion or loss of a continuous stream requires refresh; unavailable replay requires a refresh instead of appearing to succeed with no data.
A transport cursor acknowledges a complete SSE event, not your application’s processing or durable side effects. An application may still need idempotent processing after reconnecting. New subscriptions intentionally skip the existing baseline, and snapshot refresh plus resubscription is not an atomic durable changefeed API. Use a canonical DuckLake query when a durable result is required; see the interface matrix.