socketio / socket.io-redis-emitter

The Socket.IO Redis emitter, allowing to communicate with a group of Socket.IO servers from another Node.js process.
https://socket.io/docs/v4/redis-adapter/
MIT License
722 stars 121 forks source link

Cannot capture room event using the standard io.sockets.in("room").on("event",function(){}) #30

Closed magestican closed 7 years ago

magestican commented 8 years ago

I am using this emitter alongside the redis socket.io adapter in order to scale my servers, the thing is that I am not able to intercept events from serverA in serverB, the event goes through to the clients of serverB but cant intercept it using the standard : io.sockets.in("room").on("event",function(){})

any idea why? is there something like emitter.in("room").on("event",handler) ?

thank you! :+1:

darrachequesne commented 7 years ago

As far as I know, that package is meant to publish packets, not subscribe.

Also, io.sockets.in("room").on("event",function(){}) looks weird, the event listener should be registered on each socket, shouldn't it?