xgroup-createconsumer.3valkey - Man Page

Creates a consumer in a consumer group.

Synopsis

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

valkey-protocol(7) Integer reply: the number of created consumers, either 0 or 1.

Complexity

O(1)

Acl Categories

@slow @stream @write

History

See Also

xack(3valkey), xadd(3valkey), xautoclaim(3valkey), xclaim(3valkey), xdel(3valkey), xgroup(3valkey), xgroup-create(3valkey), xgroup-delconsumer(3valkey), xgroup-destroy(3valkey), xgroup-help(3valkey), xgroup-setid(3valkey), xinfo(3valkey), xinfo-consumers(3valkey), xinfo-groups(3valkey), xinfo-help(3valkey), xinfo-stream(3valkey), xlen(3valkey), xpending(3valkey), xrange(3valkey), xread(3valkey), xreadgroup(3valkey), xrevrange(3valkey), xsetid(3valkey), xtrim(3valkey)

Info

2024-09-23 8.0.0 Valkey Command Manual