Skip to main content

XREAD

Reads data from one or multiple streams, starting from the specified IDs.
1 min read

Arguments#

streamsDict[str, str]required#

A dictionary mapping stream keys to their starting IDs. Use $ to read only new messages added after the command is issued.

countint#

The maximum number of messages to return per stream.

Response#

List[List[Any]]

Returns a list where each element represents a stream and contains:

  • The stream key
  • A list of messages (ID and field-value pairs)

Returns empty list if no data is available.

Was this page helpful?