Description
You want to:
- report a bug
- request a feature
Current behaviour
Right now, it appears that rooms are a socket-level construct only. Individual connections appear to know what rooms they're a part of. Adapters like socket.io-redis
appear to have just enough functionality to know how to route messages to all members of a room.
Expected behaviour
In many applications, socket.io
will sit on top of a room that represents some potentially costly resource. For instance, in my use case, I want to spin up a docker container to be used by everyone in a room. That means I need to know when to create one and when to delete one when it's no longer being used.
I can try to track room membership on my own, but then I become a central point of failure anyhow.
Suggestion
In a system like the one socket.io-redis
suggests, I think it should be possible for all nodes to subscribe to when rooms are created or destroyed, since those changes should be pubbed through redis already.