-
Notifications
You must be signed in to change notification settings - Fork 486
TypeError: this.subClient.psubscribe is not a function #423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi! I guess we could replace psubscribe by const { createClient } = require("redis");
(async () => {
const client = createClient();
await client.connect();
const subscriber = client.duplicate();
await subscriber.connect();
await subscriber.subscribe("channel", (message, channel) => {
console.log(message, channel);
});
client.publish("channel", "test"); // prints "test channel"
client.publish("channel", Buffer.from([1,2,3])); // prints "��� channel" (buffer as string)
})(); The |
An issue was opened here: redis/node-redis#1718 Note: we could also use base64 encoding, but it would be a backward incompatible change |
Hi guys, as I see node-redis has merged the PR, so do you have plans to release a new version? |
I'm working on this. |
@darrachequesne thank you 🙏 |
Reference: https://github.com/redis/node-redis/blob/master/docs/v3-to-v4.md Related: - #427 - #423 - #417
Support for |
Please in the documentation add connect if it is explicitly required or the package doing when the client is passed. |
you added support for redis (v4) and broke the support for ioredis |
@yanush that's weird, I was not able to reproduce, and it seems there is no |
@darrachequesne I think you are right. It might be some patched code I tried to fix the node-redis v4 support. |
@djaffer done! |
Uh oh!
There was an error while loading. Please reload this page.
pubClient.duplicate()
return object with a property function named pSubscribe (S is uppercase). and at /node_modules/@socket.io/redis-adapter/dist/index.js the property is named psubscribe (S is lowercase).For now, The issue is fixed by adding property psubscribe (S is lowercase):
Versions:
The error was:
The text was updated successfully, but these errors were encountered: