https://github.com/aichbauer/pipefi
A library for simple RabbitMQ filters
https://github.com/aichbauer/pipefi
amqp filters nodejs pipes rabbitmq
Last synced: about 1 month ago
JSON representation
A library for simple RabbitMQ filters
- Host: GitHub
- URL: https://github.com/aichbauer/pipefi
- Owner: aichbauer
- License: mit
- Created: 2017-10-21T13:42:26.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-30T12:02:25.000Z (over 7 years ago)
- Last Synced: 2025-03-04T20:40:52.890Z (10 months ago)
- Topics: amqp, filters, nodejs, pipes, rabbitmq
- Language: JavaScript
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# pipefi
[](https://travis-ci.org/aichbauer/pipefi)
> A library for simple [RabbitMQ](https://www.rabbitmq.com/) filters
## Installation
```sh
$ npm i pipefi
```
## Usage
> *Note:* Only works with `Node v8+`
> Take a look at the [example](./example)
```js
const pipefi = require('pipefi');
const config = require('path/to/config');
pipefi(config);
```
## Config
* [connection](#connection)
* [pipes](#pipes)
### connection
**Type:** `object`
The connection object consists of 4 properties:
* user (`string`)
* password (`string`)
* host (`string`)
* port (`number`)
Example:
```js
{
connection: {
user: 'guest',
password: 'guest',
host: 'localhost',
port: 5672,
},
}
```
### pipes
**Type:** `array`
Pipes consists of an array of objects. One object consists of 3 different properties:
* from (`string`)
* to (`string`)
* filter (`function`)
Example:
```js
{
pipes: [
{
from: 'filterOne',
to: 'filterTwo',
filter: (msg) => msg, // do something with the message
},
],
}
```
## LICENSE
MIT © Aichbauer Lukas, Stoecklmair Jan Peer