XGROUP DESTROY
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.
Return value
Section titled “Return value”| 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.WRONGTYPEif the key holds another type.
Examples
Section titled “Examples”127.0.0.1:6379> XGROUP CREATE orders billing $ MKSTREAMOK127.0.0.1:6379> XGROUP DESTROY orders billing(integer) 1127.0.0.1:6379> XGROUP DESTROY orders billing(integer) 0Compatibility
Section titled “Compatibility”Same as Redis 7 and Valkey 8.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.