0.0.3 • Published 8 years ago
@smartcloud/pubsub-publisher v0.0.3
@smartcloud/pubsub-publisher
Pubsub publisher Module of SmartCloud Utility Library for Node.js
npm installation
$ npm install --save @smartcloud/pubsub-publisherInitialization
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.