XGROUP-...CONSUMER(3valkey)

πŸ“¦
version 9.0.6 Β· 2 versions
, in fedora 44

πŸ’– XGROUP CREATECONSUMER πŸ’–

okay bestie, so you know how this whole page is from the Valkey Command Manual? yeah. it's a manual page, section 3valkey, and it's literally just about making one (1) consumer. that's it. that's the whole thing. and honestly? iconic behavior. πŸŽ€


✨ NAME ✨

xgroup-createconsumer β€” creates a consumer in a consumer group. that's the vibe. no cap. πŸ¦‹


✨ SYNOPSIS ✨

XGROUP CREATECONSUMER key group consumer

three little arguments, one big slay. look at her go πŸ’…


✨ DESCRIPTION ✨

okay so what you're doing here is: you're creating a consumer named <consumername> inside the consumer group <groupname>, and that group lives on the stream that's chillin' at <key>. simple. clean. gorgeous. 🌸

and here's the tea, bestie β€” consumers also get created automatically whenever some operation, like XREADGROUP, references a consumer that literally does not exist yet. the group chat just adds them. no invitation needed. πŸ™ˆ

but WAIT. heads up. this auto-create thing is valid for XREADGROUP only when there is data in the stream. no data, no auto-consumer. that's the rule, periodt. πŸ’€

✨ REPLY ✨

valkey-protocol(7) Integer reply β€” it tells you the number of created consumers. and that number is either 0 or 1, because you made one. or you didn't. there is no in-between. ⭐


✨ COMPLEXITY ✨

O(1) β€” constant time, baby. instant. zero stress. main character efficiency. πŸ‘‘


✨ ACL CATEGORIES ✨

  • @slow
  • @stream
  • @write

she's tagged, she's categorized, she's booked and busy. 🌈


✨ HISTORY ✨

  • Available since: 6.2.0 β€” a legend from way back, fr fr.

✨ SEE ALSO ✨

the whole friend group, go say hi to all of them:

xack(3valkey), xadd(3valkey), xautoclaim(3valkey), xclaim(3valkey), xdel(3valkey), xgroup(3valkey), xgroup-create(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), xsetid(3valkey), xtrim(3valkey) πŸ’œ


and that's the whole page, bestie!! 🫢 this edition is version 9.0.0, dated 2025-10-21, straight from the Valkey Command Manual β€” mwah, love you, go create some consumers responsibly πŸ“βœ¨πŸ’…

πŸ“¦ where this page comes from