1.1.0 • Published 2 years ago

nodejsmq v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

NodeMQ

A simple rabbitmq library.

Installation

npm install --save nodejsmq

Quick Example

import nodejsmq from 'nodejsmq';

// create a connection to the rabbitmq server
const nodeMQ = nodejsmq('amqp://rabbitmq/');

// start consuming
nodeMQ.consume({
  queueName: 'myqueue',
  onMessage: (msg,channel,body)=>{
    console.log('Recieved message');
    console.log(body);
    nodeMQ.reply(msg, channel, 'My Response');
  },
});

// publish a message
nodeMQ.publish('myqueue','Send this info!')
  .then((response)=>{
    console.log('the consumer responded!');
    console.log(response);
  });

Full API Reference

1.1.0

2 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.7

3 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago