harcon-nats

NATS.io plugin for the harcon messaging/service bus of node-based enterprise entities.

Usage no npm install needed!

<script type="module">
  import harconNats from 'https://cdn.skypack.dev/harcon-nats';
</script>

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.

js-standard-style