Skip to content
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

Does haredis support psubscribe / pmessage? #23

Open
vladminsky opened this issue Mar 10, 2014 · 1 comment
Open

Does haredis support psubscribe / pmessage? #23

vladminsky opened this issue Mar 10, 2014 · 1 comment

Comments

@vladminsky
Copy link

Hi,

I didn't find an explicit reference in documentation on the topic so decided to post you an issue.

It looks like haredis doesn't support psubscribe / on("pmessage") mechanism.

Here is a sample:

var redis = require('haredis');
var channelClient = redis.createClient('XX.XX.XX.XX:YYYY');
channelClient.debug_mode = true;

channelClient.on('message', console.log.bind(console, 'message:'));
channelClient.on('pmessage', console.log.bind(console, 'pmessage:'));

channelClient.subscribe('sample', function (err) {});
channelClient.psubscribe('*', function (err) {});

setInterval(channelClient.publish.bind(channelClient, 'sample', 1), 3000);

Result is:

message: sample 1
message: sample 1
. . .
message: sample 1
. . .

When it is running only subscribe / message approach is executed while subscribe by pattern doesn't look work at all.

I apologize in advance in case I missed something or use the lib incorrectly.

Thank you!

@codebudo
Copy link

Ah! I've been having this same issue. I'm glad it's not just me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants