0.1.1 • Published 6 years ago

rabbit-util v0.1.1

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

Rabbit Util

The utilities of rabbitmq, supply the feature of reconnecting.

install

npm install rabbit-util --save

Usage

const {RabbitConn} = require('../../');
const rabbitmqUrl= process.env.RABBIT_URL;

new RabbitConn({
    url:rabbitmqUrl,
}).on(RabbitConn.EVENT_CONN_SUCCESS, function (conn) {
    console.log('connected ok');
    done();
}).on(RabbitConn.EVENT_CONN_ERROR,function(err) {
    console.log('an error occured',err);
}).on(RabbitConn.EVENT_CONN_CLOSE,function() {
    console.log('the connection is closed');
});
0.1.1

6 years ago

0.1.0

6 years ago