await redis.xadd(key, "*", { name: "John Doe", age: 30 });
Appends one or more new entries to a stream.
The key to of the stream.
The stream entry ID. If * is passed, a new ID will be generated automatically.
*
Key-value data to be appended to the stream.
Prevent creating the stream if it does not exist.
The trim mode.
The threshold value for the trim mode.
The comparison operator for the trim mode.
Limit how many entries will be trimmed at most.
Was this page helpful?