Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Node.js bindings to the zeromq library
JavaScript C++ C Python

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
docs
examples
lib
perf
test
.gitignore
.travis.yml
History.md
LICENSE
Makefile
README.md
binding.cc
binding.gyp
index.js
package.json
wscript

README.md

Build Status

node-zeromq

ØMQ bindings for node.js.

Installation

Install zmq package first.

$ npm install zmq

Example

producer.js:

var zmq = require('zmq')
  , sock = zmq.socket('push');

sock.bindSync('tcp://127.0.0.1:3000');
console.log('Producer bound to port 3000');

setInterval(function(){
  console.log('sending work');
  sock.send('some work');
}, 500);

worker.js:

var zmq = require('zmq')
  , sock = zmq.socket('pull');

sock.connect('tcp://127.0.0.1:3000');
console.log('Worker connected to port 3000');

sock.on('message', function(msg){
  console.log('work: %s', msg.toString());
});

Running tests

Install dev deps:

 $ npm install

Build:

 $ make

Test:

 $ make test
Something went wrong with that request. Please try again.