Reputation: 100320
I have a Redis client like so:
var redis = require("redis");
var client = redis.createClient();
client.config("SET","notify-keyspace-events", "KEA");
with the 3rd line of code, it is now configured to listen to sets and deletes of Redis keys. So this client acts as a subscriber. However, the problem is that I want this Redis client to also be able to re-publish information it receives from Redis itself, and the same Redis client can't act as both subscriber and publisher. So it seems I have two choices:
Is this correct? Which one is better in this case?
Upvotes: 1
Views: 109
Reputation: 73306
No need of Socket.IO there. Just use a second Redis client. An extra Redis connection is cheap.
Upvotes: 2