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
✅ Active-Active
✅ Standard
✅ Active-Active

Return information

History

  • Starting with Redis version 7.0.0: Added the entries_added and max_deleted_entry_id arguments.
RATE THIS PAGE
Back to top ↑