Skip to content

Connection successful, no events #17

@gorbypark

Description

@gorbypark
var PGPubsub = require('pg-pubsub');

var pubsubInstance = new PGPubsub('postgres://xxxx:xxxx@127.0.0.1/xxxx');

pubsubInstance.addChannel('testChannel');

// pubsubInstance is a full EventEmitter object that sends events on channel names
pubsubInstance.once('testChannel', function (channelPayload) {
  console.log(channelPayload);
});

The above code successfully connects to the database Successful retry attempt for pubsub but receives no notifications. On the postgres end i'm trying NOTIFY testChannel, 'Hello, world!'; and not receiving any notifications on the pg-pubsub side. Any ideas? LISTEN testChannel; and then issuing a notify command works directly on the db.

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