Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

XGROUP

Last updated
XGROUP subcommand [argument ...]
Group
Stream
Arity
-2 (at least 2 words, counting the command name)
Flags
write
HotKV Cloud
All plans
On-Premise
no license needed

XGROUP is a container for the commands that manage consumer groups on a stream. A consumer group lets several consumers share the work of reading a stream: each entry goes to one consumer, and stays pending until it is acknowledged.

Subcommand What it does
XGROUP CREATE Create a consumer group.
XGROUP SETID Set a group’s last delivered ID.
XGROUP DESTROY Delete a consumer group.
XGROUP CREATECONSUMER Add a consumer to a group.
XGROUP DELCONSUMER Remove a consumer and its pending entries.
XGROUP HELP List the subcommands.

An unknown subcommand replies ERR unknown subcommand 'name'. Try XGROUP HELP.

127.0.0.1:6379> XGROUP CREATE tasks workers $ MKSTREAM
OK
127.0.0.1:6379> XGROUP CREATECONSUMER tasks workers alice
(integer) 1
127.0.0.1:6379> XGROUP DESTROY tasks workers
(integer) 1

Same subcommands as Redis 7 and Valkey 8.

XREADGROUP, XINFO, XPENDING