XGROUP DELCONSUMER
XGROUP DELCONSUMER key group consumer
- Group
- Stream
- Complexity
- O(N), N being the consumer's pending entries
- Arity
- 5 (exactly, counting the command name)
- HotKV Cloud
- All plans
- On-Premise
- no license needed
XGROUP DELCONSUMER removes consumer from the consumer group group and
returns how many pending entries it held. Those entries leave the group’s
pending list, so no other consumer can claim them afterwards. Claim them with
XCLAIM or XAUTOCLAIM first if
they still need processing.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Always | Integer: the pending entries the consumer held (0 if it did not exist) |
Integer |
Error replies:
NOGROUP No such consumer group 'group' for key name 'key'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> XADD tasks 1700000000000-0 job email"1700000000000-0"127.0.0.1:6379> XGROUP CREATE tasks workers 0OK127.0.0.1:6379> XREADGROUP GROUP workers alice STREAMS tasks >1) 1) "tasks" 2) 1) 1) "1700000000000-0" 2) 1) "job" 2) "email"127.0.0.1:6379> XGROUP DELCONSUMER tasks workers alice(integer) 1127.0.0.1:6379> XPENDING tasks workers1) (integer) 02) (nil)3) (nil)4) (nil)Compatibility
Section titled “Compatibility”Same as Redis 7 and Valkey 8.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.