@smartcloud/pubsub-publisher
v0.0.3
Published
Pubsub Publisher Module of SmartCloud Utility Library for Node.js
Downloads
2
Keywords
Readme
@smartcloud/pubsub-publisher
Pubsub publisher Module of SmartCloud Utility Library for Node.js
npm installation
$ npm install --save @smartcloud/pubsub-publisher
Initialization
The module has core class named "PubsubPublisher". To initialize an PubsubPublisher object, pass the follow parameters.
* maxRetries - (optional) specify maximum number of times that process can retry in case of failure. If not specified, default will be 10.
Sample usage
const SmartCloudPubsubPublisher = require('@smartcloud/pubsub-publisher');
var publisher = new SmartCloudPubsubPublisher.PubsubPublisher();
Methods
pubsub() method - Return pubsub instance associated with current PubsubPublisher instance.
publish(topic, message) method - Publish message to specified topic.