XGROUP CREATECONSUMER

XGROUP CREATECONSUMER key group consumer
Available since:
Redis Open Source 6.2.0
Time complexity:
O(1)
ACL categories:
@write, @stream, @slow,
Compatibility:
Redis Software and Redis Cloud compatibility

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.

Required arguments

key

The stream key.

group

The consumer group name.

consumer

The name of the consumer to create.

Redis Software and Redis Cloud compatibility

Redis
Software
Redis
Cloud
Notes
✅ Standard
✅ Active-Active
✅ Standard
✅ Active-Active

Return information

Integer reply: the number of created consumers, either 0 or 1.
RATE THIS PAGE
Back to top ↑