Node.js tools for NSQ client
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

build status

A node.js port of pynsq reader from

Very much untested and unfinished. Basic reading/publishing works.


npm install nsq

Reader example

var NSQReader = require('../lib/nsqreader.js').Reader;

var taskFunction = function(message){ console.log(message) }

var reader = new NSQReader({"task1":taskFunction}, 'topic', 'channel', {lookupd_http_addresses:['']} );

Publishing example

var NSQ = require('../lib/nsq.js'); CONN = require("../lib/conn.js");

var conn = CONN.createClient(); conn.connect();

conn.on("connect", function () { conn.send(" V2"); var cmd = NSQ.publish('test', "hello "); conn.send(cmd);