nsq-wrapper

0.4.0 • Public • Published

nsq-wrapper

Wrapper for nsqjs to easily subscribe to multiple topics

const NSQ_Wrapper = require('nsq-wrapper')

const wrapper = new NSQ_Wrapper('channel', {
    topic1: function (msg, topic) {
        msg.finish();
    }
}, {
    nsqdHost: 'localhost',
    nsqdPort: '4150',
    nsqlookupdHost: 'localhost',
    nsqlookupdPort: '4161'
});

wrapper.connect().then(function () {
    wrapper.publish('topic1', { foo: 'bar' });
});

Readme

Keywords

none

Package Sidebar

Install

npm i nsq-wrapper

Weekly Downloads

0

Version

0.4.0

License

ISC

Last publish

Collaborators

  • vorwaertsdevs