xadd
Add entries to a Redis stream with optional expiration. Specify a stream key, fields, and an expiration time in seconds to store and manage data efficiently. Returns the entry ID or an error message.
Instructions
Add an entry to a Redis stream with an optional expiration time.
Args: key (str): The stream key. fields (dict): The fields and values for the stream entry. expiration (int, optional): Expiration time in seconds.
Returns: str: The ID of the added entry or an error message.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
expiration | No | ||
fields | Yes | ||
key | Yes |