Messaging in Node.JS with RabbitMQ
$ npm install rabbit.js
This library provides a simple, socket-oriented API for messaging in
Node.JS, using
RabbitMQ as a backend.var context = require('rabbit.js').createContext();
context.on('ready', function() {
var pub = context.socket('PUB'), sub = context.socket('SUB');
sub.pipe(process.stdout);
sub.connect('events', function() {
pub.connect('events', function() {
pub.write(JSON.stringify({welcome: 'rabbit.js'}), 'utf8');
});
});
});
See Github pages for documentation of the most recent releasegh-pages, and the branch gh-pages-next for provisional documentation of the next release (which usually corresponds to the code in master branch).
Status
Still on major version0
, though in use in a number of places, I
believe.Version 0.3.0 and on are built on amqplib. Previous versions, of which version 0.2.2 was the last, used node-amqp.