rmq-microservice-base
v1.1.0
Published
A core micro-service library using rabbitmq bus.
Downloads
1
Readme
RMQ-MicroService-Base
A base module that removes the boilier-plate from a rabbitmq micro service.
var svc = require('rmq-microservice-base');
svc({
SERVER: 'amqp://localhost',
QUEUE: 'foo.bar'
}, function(job, ack) {
// ... do stuff with job
// ... when done call ack
ack();
});
This module abstracts the connection, create and handle methods of the rabbitMQ jackrabbit module, and provides a simple api to pass in the connection and queue info as well as a function to handle each job request.
Install
npm install rmq-microservice-base --save
Run Tests
npm test
License
MIT
Contributions
pull requests welcome, please include test coverage