XSETID
XSETID key last-id [ENTRIESADDED entries-added] [MAXDELETEDID max-deleted-id]
- Available since:
- Redis Open Source 5.0.0
- Time complexity:
- O(1)
- ACL categories:
-
@write,@stream,@fast, - Compatibility:
- Redis Software and Redis Cloud compatibility
XSETID is an internal command. Users should not call it directly.
Redis primary shards use it to replicate the last delivered entry ID of the stream.
Required arguments
key
The stream key.
last-id
The ID to set as the stream's last-generated ID.
Optional arguments
ENTRIESADDED entries-added
Set the stream's entries-added counter.
MAXDELETEDID max-deleted-id
Set the stream's maximum deleted entry ID.
Redis Software and Redis Cloud compatibility
| Redis Software |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |
Return information
Simple string reply:
OK.
History
- Starting with Redis version 7.0.0: Added the
entries_addedandmax_deleted_entry_idarguments.