Cursors and replay

Continue exactly where you left off after a disconnect, using a saved cursor or a timestamp from the last 24 hours.

Explanation

Lets you continue exactly where you left off after a disconnect, using a cursor you saved or a timestamp within the last 24 hours. Use it to survive restarts and network drops without missing documents or starting again from the beginning of the stream.

RECV{"type": "heartbeat"} · {"type": "replay_complete"}Get access

Request

Frame fields

JSON text frame
resume.cursorstringbody

A cursor saved from a document header, heartbeat or replay_complete.

Example: {"cursor": "eyJ2IjoxLC4uLn0"}

resume.from_time_msintegerbody

Unix milliseconds. Arrival time, not publication time; within 24 hours.

Example: {"from_time_ms": 1793880000000}

Response

Frame you receive

application/json

These are the fields you can build against. Nested names use dot notation; optional sections are called out in their descriptions.

typestring

heartbeat (every 15 seconds) or replay_complete.

Example: heartbeat

cursorstring

Your current position.

Example: eyJ2IjoxLC4uLn0

time_msinteger

When the server prepared this message, UTC Unix milliseconds.

Example: 1793880015000

Errors and close codes

WebSocket
TEXTA JSON text frame, shown in the response example.
1000cursor_expired — The cursor or time is older than the 24-hour replay window. Resume with latest.
1000replay_busy — Replay capacity stayed full for 30 seconds. Retry with the same cursor.
1000forbidden — This key cannot resume from a cursor or time, or its access changed. Use latest.
1008bad_request — A frame, filter, fields entry or resume value was invalid. The message says which.