redis-commander
redis-commander copied to clipboard
When Subscribing: "ERROR: Connection in subscriber mode, only subscriber commands may be used"
I'm getting this error continuously when I try to SUBSCRIBE [channel] to a channel that I know exists from PUBSUB CHANNELS.
Anyone have any idea why I'm getting this error when using the CLI from the redis commander GUI?
SUBSCRIBE needs special handling not done inside redis commander command line right now
see description at the redis driver https://github.com/luin/ioredis#pubsub
related to #337 booth need extra Redis connections to handle multi command and subscribe
Need to rewrite connection handling to support these features...
We need to create two Redis clients. One for getting and setting key-value pairs and another one for pubsub commands.
const redis = new Redis({
host: process.env.REDIS_HOST,
port: Number(process.env.REDIS_PORT),
});
const redisForSub = new Redis({
host: process.env.REDIS_HOST,
port: Number(process.env.REDIS_PORT),
});
We need to create two Redis clients. One for getting and setting key-value pairs and another one for pubsub commands.
const redis = new Redis({ host: process.env.REDIS_HOST, port: Number(process.env.REDIS_PORT), }); const redisForSub = new Redis({ host: process.env.REDIS_HOST, port: Number(process.env.REDIS_PORT), });
Should their port and host be different?