Skip to main content
Reads are the main entry point for consuming a stream. You can start reading from:
  • A sequence number — read from an exact position.
  • A timestamp — read from the first record at or after a given time.
  • A tail offset — read from N records before the current tail.

Live tailing

Read sessions can transition directly into live tailing. When a read catches up to the current tail, the connection stays open and new records are delivered as they’re appended. If no stop condition is specified, the session follows the stream indefinitely. To stop at the tail instead of following, set a stop condition (count, bytes, or until). In the SDKs, live tailing is available through the stream read session method. From the HTTP API directly, you can request an SSE response.

Long polling

Unary reads support a wait parameter that causes the request to block for up to the specified number of seconds if no new records are available. This is useful for simple consumers that poll rather than maintain a session.

Limits

A single read (unary or one batch from a session) returns up to 1000 records or 1 MiB. For larger reads, use a read session to stream multiple batches over it.

See also