Skip to main content
Streaming endpoints yield parsed JSON events as they arrive (or return a lazy Enumerator when called without a block), with automatic exponential backoff reconnection, keep-alive heartbeat callbacks, and optional idle-timeout stall detection.

Consuming a stream

Error classification

  • Retryable (err.retryable? == true): connection resets, timeouts (Xdk::StreamIdleTimeoutError), 429 rate limits, and 5xx server errors — retried automatically with exponential backoff and jitter, resetting the backoff counter whenever an event or keep-alive heartbeat arrives.
  • Non-retryable (err.retryable? == false): 401 / 403 authentication errors and other 4xx client errors raise Xdk::StreamError immediately.