snt

seneca-nats-transport

Seneca NATS transport

Showing:

Popularity

Downloads/wk

19

GitHub Stars

10

Maintenance

Last Commit

5yrs ago

Contributors

1

Package

Dependencies

1

Size (min+gzip)

6.9KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

seneca-nats-transport

NPM Build Status Coverage

Seneca NATS transport.

Seneca is a microservices framework and NATS is an open-source, high-performance, lightweight cloud messaging system. This library provides a publish-subscribe message distribution model.

Installation

npm install seneca-nats-transport

Usage

gnatsd server should be running.

// server.js

require('seneca')()
  .use('nats-transport')
  .add({role: 'foo', cmd: 'bar'}, function(msg, done) { return done(null, msg); })
  .listen({type:'nats'});
// client.js

require('seneca')()
  .use('nats-transport')
  .client({type:'nats'})
  .act({role: 'foo', cmd: 'bar', arg1: 1, arg2: 2}, console.log);
// nats.js

require('nats').connect().subscribe('*', function(msg) {
  console.log(msg);
});
gnatsd
node nats.js
node server.js
node client.js

License

Licensed under The MIT License (MIT)
For the full copyright and license information, please view the LICENSE.txt file.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial