An EventEmitter interface over Rabbot.
The tests and usage documentation assumes a locally running RabbitMQ server with default settings.
npm install rabbot-event-emitter --save
var rabbit = require('rabbot');
var config = require('./config');
var EventEmitter = require('../index.js')({
config,
log: console.log,
listening: true
});
EventEmitter.on("event-data", function(payload) {
console.log("Received payload", payload);
})
EventEmitter.emit("event-data", {name: "some data"});
npm test
Currently in beta stage. I plan to target better reliability and failover in future features. Pull requests and advice welcome :)