pipefi

1.0.1 • Public • Published

pipefi

Build Status

A library for simple RabbitMQ filters

Installation

$ npm i pipefi

Usage

Note: Only works with Node v8+

Take a look at the example

const pipefi = require('pipefi');
 
const config = require('path/to/config');
 
pipefi(config);

Config

connection

Type: object

The connection object consists of 4 properties:

  • user (string)
  • password (string)
  • host (string)
  • port (number)

Example:

{
  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:

{
  pipes: [
    {
      from: 'filterOne',
      to: 'filterTwo',
      filter: (msg) => msg, // do something with the message
    },
  ],
}

LICENSE

MIT © Aichbauer Lukas, Stoecklmair Jan Peer

Package Sidebar

Install

npm i pipefi

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • jpeer
  • aichbauer