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

PUBLISH from redis not captured #45

Open
devtoro opened this issue Jan 26, 2018 · 1 comment
Open

PUBLISH from redis not captured #45

devtoro opened this issue Jan 26, 2018 · 1 comment

Comments

@devtoro
Copy link

devtoro commented Jan 26, 2018

Hello!

So I was fooling around with REDIS and node-redis-pubsub. I started two redis-cli instances locally and ran two node scripts like the above:

var NRP = require('node-redis-pubsub');

var nrpConfig = {
  port: 6379,
  host: '127.0.0.1'
};

var nrp = new NRP(nrpConfig); // This is the NRP client

console.log("Listening to channel test");


nrp.on(
  'test',
  function(data){
    console.log('DATA RECEIVED: ' + data);
  }
);

In one redis-cli, I subscribed to channel test

From the other I publish to channel test and see the results ONLY IN THE REDIS CLI SUBSCRIBED INSTANCE, but nothing happens from the script. If I publish to the same channel from node environment, the script suddenly works and I see the published message.

Any clues why this might be happening ?

@RangerMauve
Copy link
Collaborator

Could you post the code you're using to pub and sub from the cli?

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