Skip to content
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

Support multiple subscriptions to one Redis channel #65

Open
jonahsnider opened this issue Jul 2, 2024 · 0 comments · May be fixed by #66
Open

Support multiple subscriptions to one Redis channel #65

jonahsnider opened this issue Jul 2, 2024 · 0 comments · May be fixed by #66
Labels
Type: Enhancement Improving an existing feature

Comments

@jonahsnider
Copy link

jonahsnider commented Jul 2, 2024

In @adonisjs/redis, trying to do redis.subscribe() when the specified channel already has an active subscription will throw an error.

It would be nice if instead of throwing, @adonisjs/redis was able to intelligently group duplicate subscriptions together.

redis.subscribe('users/123', callback); // opens connection

// later...
redis.subscribe('users/123', callback); // reuses existing subscription

@adonisjs/redis is described as "The package is a thin wrapper on top of ioredis with better DX around Pub/Sub and automatic management of multiple redis connections", so this feature seems very inline with the package's goals.


Originally posted as a discussion here

@thetutlage thetutlage added the Type: Enhancement Improving an existing feature label Jul 2, 2024
@jonahsnider jonahsnider linked a pull request Jul 2, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improving an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants