XGROUP CREATECONSUMER · Valkey

XGROUP CREATECONSUMER

Creates a consumer in a consumer group.

Usage

XGROUP CREATECONSUMER key group consumer

Description

Create a consumer named <consumername> in the consumer group <groupname> of the stream that’s stored at <key>.

Consumers are also created automatically whenever an operation, such as XREADGROUP, references a consumer that doesn’t exist. This is valid for XREADGROUP only when there is data in the stream.

Reply

Integer reply: the number of created consumers, either 0 or 1.

Complexity

O(1)

ACL Categories

@slow @stream @write

History

See also

XACK, XADD, XAUTOCLAIM, XCLAIM, XDEL, XGROUP, XGROUP CREATE, XGROUP DELCONSUMER, XGROUP DESTROY, XGROUP HELP, XGROUP SETID, XINFO, XINFO CONSUMERS, XINFO GROUPS, XINFO HELP, XINFO STREAM, XLEN, XPENDING, XRANGE, XREAD, XREADGROUP, XREVRANGE, XSETID, XTRIM.