Skip to content

Conversation

jk2K
Copy link
Contributor

@jk2K jk2K commented May 31, 2025

fix #1258

Copy link

codecov bot commented May 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kevwan kevwan requested a review from Copilot June 7, 2025 12:35
@kevwan kevwan added the feature Marks an issue or PR as related to a new feature. label Jun 7, 2025
Copilot

This comment was marked as outdated.

@kevwan kevwan self-assigned this Jun 7, 2025
@kevwan kevwan requested a review from Copilot June 8, 2025 14:03
Copy link
Contributor

@Copilot Copilot AI left a 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) {

@kevwan
Copy link
Contributor

kevwan commented Jun 8, 2025

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!

@kevwan kevwan force-pushed the redis-stream-command branch from 21ab713 to fee33c1 Compare July 17, 2025 01:57
@kevwan kevwan added this to the v1.9.0 milestone Jul 17, 2025
jk2K and others added 4 commits August 2, 2025 21:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kevwan kevwan force-pushed the redis-stream-command branch from fee33c1 to 3b1a3cb Compare August 2, 2025 13:19
@kevwan kevwan added this pull request to the merge queue Aug 2, 2025
Merged via the queue into zeromicro:master with commit 9da76fb Aug 2, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Marks an issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How can I use Redis' streaming command like "XADD" in go-zero ?
2 participants