Closed
Description
Issue tracker is used for reporting bugs and discussing new features. Please use
stackoverflow for supporting issues.
use XReadGroup read msg from stream:
entries, err := client.XReadGroup(ctx1, &redis.XReadGroupArgs{
Group: group,
Consumer: consumer,
Streams: []string{streamName, ">"},
//Streams: []string{"mystream"},
Count: 10,
Block: 5000, // Block for 5000 milliseconds
}).Result()
Expected Behavior
Use XReadGroup to read messages from the specified consumer group, setting the Block parameter to 5000 milliseconds.
If no new messages are available, the program will return after 5 seconds and continue the loop.
Current Behavior
if we set Block: 5000 the api is block and not return ,until the new message come
Possible Solution
Steps to Reproduce
entries, err := client.XReadGroup(ctx1, &redis.XReadGroupArgs{
Group: group,
Consumer: consumer,
Streams: []string{streamName, ">"},
//Streams: []string{"mystream"},
Count: 10,
Block: 5000, // Block for 5000 milliseconds
}).Result()
Context (Environment)
Detailed Description
Possible Implementation
Metadata
Metadata
Assignees
Labels
No labels