# mongoose-amqplib-plugin

> Publish Mongoose models over AMQP

Latest version **0.8.0** (published 2016-02-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install mongoose-amqplib-plugin
pnpm add mongoose-amqplib-plugin
yarn add mongoose-amqplib-plugin
bun add mongoose-amqplib-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.0 |
| Published | 2016-02-05 |
| First published | 2016-02-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Brian Lauber |
| Maintainers | briandamaged |
| Keywords | mongoose, mongoose-plugin, amqplib, amqp |

## Links

- npm: https://www.npmjs.com/package/mongoose-amqplib-plugin
- Repository: https://github.com/briandamaged/mongoose-amqplib-plugin
- Homepage: https://github.com/briandamaged/mongoose-amqplib-plugin#readme
- Issues: https://github.com/briandamaged/mongoose-amqplib-plugin/issues
- npm.io page: https://npm.io/package/mongoose-amqplib-plugin

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 0.8.0 (latest) — 2016-02-05

## README

# mongoose-amqplib-plugin #

Publish Mongoose models over AMQP.

## Installation ##

```shell
npm install --save mongoose-amqplib-plugin
```

## Usage ##

```javascript
var amqpPlugin = require('mongoose-amqplib-plugin');


// Create an instance of the plugin, and override all of
// the possible options.
Schema1.plugin(amqpPlugin, {
  channel:    amqpChannelInstance,

  // For more information about these options, see:
  //   http://www.squaremobius.net/amqp.node/channel_api.html#channel_publish
  exchange:   'the.exchange.name',
  routingKey: 'the.routing.key',
  options:    {persistent: true}
});


// This time, we'll just use the default values for the
// options.  These are:
//
//  exchange:   'model.events',
//  routingKey: '',
//  options:    undefined
//
Schema2.plugin(amqpPlugin, {
  channel:    amqpChannelInstance
});


// Of course, maybe you don't like those default options.
// Fine -- just change them.
amqpPlugin.defaultOptions = {
  exchange: "my.better.name",
  options:  {
    persistent: true
  }
};
```

---
_Source: https://npm.io/package/mongoose-amqplib-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
