google-pubsub-wrapper

2.3.2 • Public • Published

google-pubsub-wraper

Easy to use wrapper for Google pubsub

Example usage

var Pubsub = require('../../pubsub.js');

var pubsubServer = Pubsub.init(process.env.GCLOUD_PROJECT);
var pubsubClient = Pubsub.init(process.env.GCLOUD_PROJECT);

pubsubClient.subscribe(
{
    env: 'testing',
    topicName: 'test',
    groupName: 'test',
    callback: function (data)
    {
        console.log('got data');
    }
});

pubsubServer.emit(
{
    test: 'test'
},
{
    env: 'testing',
    topicName: 'test'
});

Readme

Keywords

Package Sidebar

Install

npm i google-pubsub-wrapper

Weekly Downloads

2

Version

2.3.2

License

none

Unpacked Size

30.1 kB

Total Files

12

Last publish

Collaborators

  • glesage
  • nickchapleau