Complete the code to read messages from a Redis stream using XREADGROUP.
XREADGROUP GROUP mygroup consumer1 COUNT [1] STREAMS mystream >The COUNT option limits the number of messages returned. Here, 10 messages are requested.
Complete the code to specify the consumer group name in XREADGROUP.
XREADGROUP GROUP [1] consumer1 COUNT 5 STREAMS mystream >
The GROUP option requires the exact consumer group name. Here, 'mygroup' is correct.
Fix the error in the XREADGROUP command to read pending messages for a consumer.
XREADGROUP GROUP mygroup [1] COUNT 5 STREAMS mystream 0
The second argument after GROUP is the consumer name. 'consumer1' is correct here.
Fill both blanks to read new messages for a consumer group from a stream.
XREADGROUP GROUP [1] [2] COUNT 10 STREAMS mystream >
The GROUP name is 'mygroup' and the consumer name is 'consumer1' to read new messages.
Fill all three blanks to read pending messages for a specific consumer in a group.
XREADGROUP GROUP [1] [2] COUNT 5 STREAMS mystream [3]
To read pending messages, use the group name 'mygroup', consumer 'consumer2', and ID '0'.