xreadgroup
Read entries from a Redis stream using a consumer group, specifying key, group, consumer, and optionally count or blocking timeout.
Instructions
Read entries from a Redis stream using a consumer group.
Args: key (str): The stream key. group_name (str): The consumer group name. consumer_name (str): The consumer name. count (int, optional): Maximum number of entries to retrieve. block_ms (int, optional): Maximum time to block waiting for entries. Use None for a non-blocking read. 0 is rejected because Redis treats BLOCK 0 as an indefinite wait. stream_id (str, optional): Stream ID to read from. Use ">" for new messages.
Returns: str: The retrieved stream entries or an error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| group_name | Yes | ||
| consumer_name | Yes | ||
| count | No | ||
| block_ms | No | ||
| stream_id | No | > |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |