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 DESTROY

Last updated
XGROUP DESTROY key group
Group
Stream
Complexity
O(N), N being the group's pending entries
Arity
4 (exactly, counting the command name)
HotKV Cloud
All plans
On-Premise
no license needed

XGROUP DESTROY removes the consumer group group from the stream at key, together with its consumers and its pending entries list. The stream’s entries are not touched. Clients blocked in XREADGROUP on that group get a NOGROUP error.

Case RESP2 RESP3
Group removed Integer 1 Integer 1
No such group Integer 0 Integer 0

Error replies:

  • ERR The XGROUP subcommand requires the key to exist. ... when the stream does not exist.
  • WRONGTYPE if the key holds another type.
127.0.0.1:6379> XGROUP CREATE orders billing $ MKSTREAM
OK
127.0.0.1:6379> XGROUP DESTROY orders billing
(integer) 1
127.0.0.1:6379> XGROUP DESTROY orders billing
(integer) 0

Same as Redis 7 and Valkey 8.

XGROUP CREATE, XGROUP, XINFO GROUPS