XGROUP-...CONSUMER(3valkey)
π 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
- 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