Skip to content
Alchemy Logo

Connection lifecycle

This API is in private preview. Target September 2026; timing is subject to change.

  1. Open a TLS WebSocket connection.
  2. Authenticate when the connection is established.
  3. Send one or more subscription frames.
  4. Wait for an acknowledgement for each subscription.
  5. Process messages and persist the latest cursor for each replay-capable subscription.
  6. If the connection closes, reconnect with exponential backoff and jitter.
  7. Resume replay-capable subscriptions from their last persisted cursor. Complete-snapshot streams resubscribe without a cursor.

The connection uses WebSocket ping and pong frames. Clients must respond promptly and should treat a missed pong as a dead connection, then reconnect.

For the sequencing and recovery model, see timestamps, cursors, and replay.

For replay-capable subscriptions, resume is per subscription: supply the last persisted cursor in that subscription's subscribe frame. Complete-snapshot streams resubscribe without a cursor.

Clients should apply bounded queues. A consumer that cannot keep up may receive an error frame before the connection is disconnected.

Errors arrive as a structured frame on the same connection.

Was this page helpful?