-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat: redis support consumer groups #4912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for Redis consumer groups to address issue #1258.
- Introduces new test cases for consumer group operations in redis_test.go.
- Implements new API methods in redis.go for consumer group features (e.g., XGroupCreate, XGroupCreateMkStream, XInfoConsumers, XInfoGroups, XInfoStream, XAdd, XAck, and XReadGroup).
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
core/stores/redis/redis_test.go | Adds tests for validating consumer group support in Redis. |
core/stores/redis/redis.go | Implements new Redis methods for consumer groups and related info. |
Comments suppressed due to low confidence (2)
core/stores/redis/redis.go:2417
- Consider adding inline documentation to differentiate XGroupCreate from XGroupCreateMkStream and to explain the expected behavior for consumer group creation, particularly regarding handling of streams.
func (s *Redis) XGroupCreate(stream string, group string, start string) (string, error) {
core/stores/redis/redis_test.go:2179
- [nitpick] Adding brief comments in the test to clarify the scenarios (e.g., expected errors with bad type and success with valid type) could improve the readability and maintainability of the tests.
func TestRedisXGroupCreate(t *testing.T) {
I'll merge this PR in v1.8.5. Because I need to think about how to use the redis connection. Consumers will use the connection with blocking mode and keep consuming the stream messages. Thanks! |
21ab713
to
fee33c1
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
fee33c1
to
3b1a3cb
Compare
fix #1258