0.0.3 • Published 7 years ago

@smartcloud/pubsub-publisher v0.0.3

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

@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.