amino-queue-amqp allows you to use an AMQP server (such as
RabbitMQ as a queue backend for
amino.
Usage
order-sprocket.js
var amino = require('amino')
.use(require('amino-queue-amqp'), {url: 'amqp://my-server'});
amino.queue('orders', {type: 'sprocket-b', spokes: 5});
console.log('Your order is processing!');
make-sprockets.js
var amino = require('amino')
.use(require('amino-queue-amqp'), {url: 'amqp://my-server'});
amino.process('orders', function(order, next) {
makeSprocket(order, function(err, sprocket) {
if (sprocket) {
console.log('Created sprocket with id ' + sprocket.id);
}
next(err);
});
});