npm install crane




Crane is a message queue
middleware layer for Node. Applications can be constructed
by using _middleware_ and defining _routes_.
This architecture has been proven effective by Express,
which provides HTTP middleware. Crane adopts this approach, repurposing it
for use with message queues, allowing workers to be built quickly and easily,
using patterns familiar to Node.js developers.
$ npm install crane
var crane = require('crane');
var app = crane();
app.work('tasks/email', function(msg, next) {
console.log('sending email to: ' + msg.body.to);
msg.ack();
});
Adapters are used to connect to message queues, receiving messages and
dispatching those messages to the application for processing.
The following table lists commonly used strategies:
|Adapter |Developer |
|--------------------------------------------------|------------------------------------------------|
|AMQP |Jared Hanson |
$ npm install
$ make test
Copyright (c) 2011-2014 Jared Hanson <http://jaredhanson.net/>