XSETID(3valkey)
π XSETID (valkey manual, section 3) π
okay bestie, gather round, because this one is not the command you casually type into your terminal. it's the backstage pass of the stream world. β¨
πΈ NAME πΈ
xsetid β an internal command for replicating stream values. lowkey mysterious, highkey important. π
π¦ SYNOPSIS π¦
XSETID key last-id [ENTRIESADDED entries-added] [MAXDELETEDID
max-deleted-id]
that's it. that's the whole vibe. two optional arguments, one big responsibility.
π DESCRIPTION π
so like, the XSETID command is an internal command. it's not here for you to play with, it's here for the machinery. π«Ά
a Valkey primary uses it to replicate the last delivered ID of streams. that's the whole job. it's giving "I work behind the scenes and I never get credit" energy, and honestly? iconic. π
π REPLY π
valkey-protocol(7) Simple string reply: OK.
yeah. that's it. she says OK and moves on with her life. no notes. π
β COMPLEXITY β
constant time, bestie. instant. no cap. π₯
π ACL CATEGORIES π
@fast@stream@write
three little tags, all of them slaying. π
π°οΈ HISTORY π°οΈ
- Available since: 5.0.0 β¨
- Changed in 7.0.0: Added the
entries_addedandmax_deleted_entry_idarguments.
she got a glow-up in 7.0.0 and honestly the upgrade ate. π
π SEE ALSO π
the whole stream bestie squad, fr fr:
xack(3valkey)xadd(3valkey)xautoclaim(3valkey)xclaim(3valkey)xdel(3valkey)xgroup(3valkey)xgroup-create(3valkey)xgroup-createconsumer(3valkey)xgroup-delconsumer(3valkey)xgroup-destroy(3valkey)xgroup-help(3valkey)xgroup-setid(3valkey)xinfo(3valkey)xinfo-consumers(3valkey)xinfo-groups(3valkey)xinfo-help(3valkey)xinfo-stream(3valkey)xlen(3valkey)xpending(3valkey)xrange(3valkey)xread(3valkey)xreadgroup(3valkey)xrevrange(3valkey)xtrim(3valkey)
go read them all, i'll wait. π§
real talk though: this is an internal command. if you're reaching for it in your app code, bestie, step back. it exists for the primary to replicate stream state, and messing with it is not the main character move you think it is. π
okay that's the whole page!! version 9.0.0, dated 2025-10-21, straight from the valkey manual, rewritten with love and glitter by your favorite unix bestie. stay slay, keep your streams synced, and don't touch internal commands unless you know exactly what you're doing. mwah ππΈπ¦β¨
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms