peleg
v0.4.1
Published
Peleg - A simple messaging processor for AMQP
Downloads
2
Maintainers
Readme
Peleg
A simple messaging processor for AMQP
Installation
npm install peleg --save
How to use
var peleg = require('peleg'),
Promise = require('bluebird');
peleg.connect().then(function() {
peleg.queue("notification:send").publish({message: "Hello World!"});
peleg.queue("notification:send").process(function(data) {
console.log("Received", data.message);
return Promise.resolve();
})
});
Samples
Roadmap
[ ] Support two connections: Publish connection, and process connection.
[ ] Peleg RPC:
peleg.call('calculator.add', 1, 2).then(function(sum) { console.log(sum); });
peleg.service('calculator.add').process(function(data) { return data[0] + data[1]});