pub-sub-amqp

v1.0.1
A simple pub sub module using AMQP
amqp pub/sub publish subscribe rabbitmq 0mq event

pub-sub-amqp

npm version build status

An easy to use, no frills module allowing inter-process publish/subscribe communication on the top of an AMQP broker like RabbitMQ.

Installation

npm install pub-sub-amqp

Usage


var amqpClient = require('pub-sub-amqp');

new amqpClient({ uri: 'amqp://localhost' }, function (err, eventManagar) {

    eventManagar.on('ready', function (err, event) {
      console.log(event.data); // -> { some: 'data' }
    });

    eventManagar.emit('ready', { some: 'data' });
});

API

Test

npm test

License

MIT

npm i pub-sub-amqp

Metadata

  • MIT
  • Whatever
  • Tarun Batra
  • released 2/11/2017

Downloads

Maintainers