Merged
Conversation
manavkush
reviewed
Dec 7, 2025
There was a problem hiding this comment.
Changes seem good 👍 . Didn't test yet though.
@coolwednesday the AI suggestions for the logging can be added for redacting sensitive information. Can check this in other critical flows as well.
Member
Author
|
Will reopen the PR after fixing the review comments, linters, tests and proper testing. |
Member
Umang01-hash
left a comment
There was a problem hiding this comment.
- Can we rename the file
metrics_interface.goinside redis directory tomock_metrics.go. - We have a file
config_test.gobut in respect to thatconfig.gofile doesn;t exist. That violates Go naming conventions and makes code harder to discover. - The file
pubsub_query_test.gocontains only 2 tests for theQuery()method, butpubsub_test.goalready has query tests (testChannelQuery()andtestStreamQuery()ingetQueryTestCases()). We can deletepubsub_query_test.goand merge the 2 tests intopubsub_test.go.
94bf57d to
4f9f5ef
Compare
aryanmehrotra
requested changes
Dec 24, 2025
7bcae9a to
19649ab
Compare
a575244 to
061b4b8
Compare
11b3279 to
6ca6368
Compare
72234ea to
5118254
Compare
aryanmehrotra
approved these changes
Dec 29, 2025
Umang01-hash
approved these changes
Dec 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redis PubSub: Streams Support and Default Mode Change
Description:
pubsubtostreams. The implementation follows the same patterns as other pubsub providers (NATS, EventHub, Kafka) and includes full support for consumer groups, acknowledgments, and message persistence.Testing Redis PubSub
Prerequisites
Start Redis using Docker:
Testing Streams Mode (Persistence) - Default
Streams mode provides persistent messaging with consumer groups and acknowledgments. Messages are stored in Redis and can be processed even after app restarts.
Configuration
Create
configs/.env:Test Persistence
Start Publisher (using
gofr/examples/using-publisher):cd gofr/examples/using-publisher go run main.goPublish messages:
Start Subscriber (using
gofr/examples/using-subscriber):cd gofr/examples/using-subscriber go run main.goVerify Persistence:
Testing PubSub Mode (Fire-and-Forget)
PubSub mode provides non-persistent messaging. Messages are delivered only to active subscribers and are lost if no subscriber is listening.
Configuration
Create
configs/.env:Test Fire-and-Forget Behavior
Start Subscriber first:
cd gofr/examples/using-subscriber go run main.goPublish messages (subscriber is listening):
Stop the subscriber and publish more messages:
Restart subscriber:
Features
✅ Streams Mode (Default)
✅ PubSub Mode
Checklist:
goimportandgolangci-lint.