0.0.7 • Published 7 years ago

@smartcloud/pubsub-listener v0.0.7

Weekly downloads
6
License
Apache-2.0
Repository
github
Last release
7 years ago

@smartcloud/pubsub-listener

Pubsub listener Module of SmartCloud Utility Library for Node.js

npm installation

$ npm install --save @smartcloud/pubsub-listener

Initialization

The module has core class named "PubsubListener". To initialize an PubsubListener object, pass the follow parameters.

* trigger - (required) target pubsub name.

* listenerName - (required) listener process name

* targets - (required) listener's targets

* filter - (optional) filters

Sample usage

const SmartCloudPubsubListener = require('@smartcloud/pubsub-listener');

var listener = new SmartCloudPubsubListener.PubsubListener();

Methods

  • getMessage(event) method - Return message details (event id, attributes, and message) based on pubsub event passed.