harcon-nats
v2.2.43
Published
NATS.io plugin for the harcon messaging/service bus of node-based enterprise entities.
Downloads
61
Maintainers
Readme
harcon-nats
NATS.IO transport layer ("Barrel") plugin for harcon.
Zero configuration scaling: this transport layer supports infinite horizontal scaling for harcon microservices without any configuration. All service discovery and balancing logic is provided by this package.
Installation
npm install harcon harcon-nats --save
Usage
let Harcon = require('harcon')
let Nats = require('harcon-nats')
let natsConfig = { 'url': 'nats://localhost:4222' }
let harcon = new Harcon( { Barrel: Nats.Barrel, barrel: natsConfig } )
Should the recipients be not available or fail to meet the timeframe defined by the attribute 'timeout', harcon will call the callbacks of the given messages with an error.