gather Redis's sub connections to one connection
This is a proxy of Redis for SUBSCRIBE.
In typical situation of using Pub/Sub of Redis, you want to subscribe many channels on a single process.
But that makes you to create many clients resulting EMFILE error.
This module proxies many SUBSCRIBE clients to a single Redis connection.
var proxy = require"redis-sub-proxy"connection sub1 sub2;connection = proxycreateConnection6379 'localhost'; // extention of redis.RedisClientsub1 = connectioncreateClient;sub1subscribe'chat:room1'sub1on"message" console.log"sub1: " ch msgsub2 = connectioncreateClient;sub2subscribe'chat:room2'sub2on"message" console.log"sub2: " ch msg