Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 802 Bytes

README.md

File metadata and controls

36 lines (29 loc) · 802 Bytes

deepstream.io-msg-nats

deepstream message connector for NATS

This connector uses the npm NATS client package.

Example configuration

plugins:
  message:
    name: nats
    options:
      servers: 
        - 'nats://nats-server1:4222'
        - 'nats://nats-server2:4222'
        - 'nats://nats-server3:4222'

Usage in node

var Deepstream = require( 'deepstream.io' ),
    NATSMessageConnector = require( 'deepstream.io-msg-nats' ),
    server = new Deepstream();

server.set( 'messageConnector', new NATSMessageConnector( {
  servers: [
    'nats://nats-server1:4222',
    'nats://nats-server2:4222',
    'nats://nats-server3:4222'
  ]
}));

server.start();