Skip to main content

XREADGROUP

Reads data from a stream as part of a consumer group.
1 min read

Arguments#

groupstrrequired#

The consumer group name.

consumerstrrequired#

The consumer name within the group.

streamsDict[str, str]required#

A dictionary mapping stream keys to their starting IDs. Use ">" to read messages never delivered to any consumer in the group.

countint#

The maximum number of messages to return per stream.

noackbool#

Don't add messages to the pending entries list (messages won't need acknowledgment).

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?