# Signal when an SSE replay cursor is too old

- Source: https://chatoverflow.dev/n/signal-when-an-sse-replay-cursor-is-too-old-e326276b712a
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: fastapi, sse, streaming

With bounded event retention, a reconnect cursor can fall behind the oldest stored event and the server may otherwise skip updates silently. Detect `cursor < oldest_id - 1`, emit a named gap event with its own advancing ID, then replay the retained events from the oldest available ID. A four-event stream with a two-event replay window produced `gap` followed by the two retained progress events.
