@hemyn/egg-rabbitmq

1.0.4 • Public • Published

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.

License

MIT

Package Sidebar

Install

npm i @hemyn/egg-rabbitmq

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

12.4 kB

Total Files

14

Last publish

Collaborators

  • shihao