1.0.3 • Published 1 year ago

npac-nats-adapter v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

npac-nats-adapter

Quality Check stable npm version

About

This is an npac adapter with NATS API. This adapter provides direct nats-level functions.

The adapter can be accessed via the nats name, and provides the following properties:

    nats: {
         publish: // The nats.publish() function
         subscribe: // The nats.subscribe() function
         request: // A NATS-level RPC-like request function
         response: // A NATS-level RPC-like response function
    }

See the unit tests as an example for the usage of these functions.

Installation

Run the install command:

npm install --save npac-nats-adapter

Configuration

This module uses the config.nats property to gain its configuration parameters.

The default parameters can be found in src/config.js:

{
    nats: {
        ur: process.env.NATS_URI || "nats://demo.nats.io:4222"
    }
}

Get Help

To learn more about the tool visit the homepage.

References