rabbitmq-wrapper
v2.0.0-beta4
Published
AMQP wrapper for managing RabbitMQ
Downloads
3
Readme
rabbitmq-wrapper
Wrapper around the node-amqp library for easily creating rabbitmq publishers/subscribers for building worker queues.
Install
npm install --save rabbitmq-wrapper
Setup
let RabbitMQ = require('rabbitmq-wrapper');
let queue = new RabbitMQ();
queue.publishToQueue('<queueName>', {
foo: 'bar'
}, true);
queue.getQueue('<queueName>')
.then((queue) => {
queue.subscribe((message, headers, deliveryInfo, messageObject) => {
console.log(message);
messageObject.acknowledge();
});
})