Skip to content

phillro/nodensq

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
October 12, 2012 16:42
October 12, 2012 16:42
October 12, 2012 16:09
October 12, 2012 16:10
October 12, 2012 19:25

build status

A node.js port of pynsq reader from https://github.com/bitly/nsq

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

Installation

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:['127.0.0.1:4161']} ) reader.run();

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);
});

About

Node.js tools for NSQ client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published