-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
could you please add pub/sub support? #27
Comments
Reading https://redis.io/commands/pubsub you can send Should hiredis-cluster send the command a specific node by hashing the channel (as it does for regular Redis keys)? |
No, pubsub channels are not sharded like keys. They are forwarded between the Redis nodes in a cluster, so you can subscribe to any node and publish to any node. (Pubsub doesn't scale that well in a large cluster since all messages are forwarded to all nodes, but that's different topic.) I'm not sure what is the best way to implement this in hiredis-cluster but it can be good to know that when using pubsub, you typically need a dedicated connection to receive published messages. The documentation of SUBSCRIBE says:
[Edit] For commands like |
Thanks.
The text was updated successfully, but these errors were encountered: