@hemyn/egg-rabbitmq
v1.0.4
Published
rabbitmq client for egg
Downloads
2
Readme
egg-rabbitmq
Install
$ npm i @hemyn/egg-rabbitmq --save
Usage
// {app_root}/config/plugin.js
exports.rabbitmq = {
enable: true,
package: '@hemyn/egg-rabbitmq',
};
Configuration
// {app_root}/config/config.default.js
exports.rabbitmq = {
address: "amqp://localhost:5672",
queues: [
{
queue: "log1",
queueOption: {
durable: true,
},
exchange: "logs",
exchangeOption: {
type: "fanout",
durable: true,
},
consumer: "",
consumerOption: {},
},
{
queue: "log2",
queueOption: {
durable: true,
},
exchange: "logs",
exchangeOption: {
type: "fanout",
durable: true,
},
consumer: "",
consumerOption: {},
},
],
};
see config/config.default.js for more detail.
Example
Questions & Suggestions
Please open an issue here.