1.1.0 • Published 9 years ago

rmq-microservice-base v1.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
9 years ago

RMQ-MicroService-Base

build status

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