rabbit-client
RabbitMQ client with implemented reconnection & error handling
Install
$ npm i rabbit-client
Test
$ npm test
API
Constructor
const RabbitClient = ; const rabbitClient = 'amqp://localhost:5672' json: true appName: 'my-app' ;
Pass { json: true }
if you want to have JSON.parsed messages in data
field of consume callback function.
Get connection
.getConnection()
rabbitClient;
Get channel
.getChannel()
const channel = await rabbitClient; await channel;
You can use objects as content without converting it to Buffer.
Get channel
.getChannel(options)
rabbitClient;