Skip to content

PUBLISH from redis not captured #45

@devtoro

Description

@devtoro

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions