🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

eip-redis

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eip-redis

Redis Adapter for the eip module. It supports a pubsub module on top of redis.

Source
npmnpm
Version
1.5.1
Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

eip-mongo

Enterprise Integration Patterns for javascript redis adapter.

Create a redis pubsub to be used in resource-throttler. Aggregate events through many nodes.

Dependencies

In order for this module to work a redis connection is required.

Installation

npm install --save eip-redis

Usage

const eip = require('eip');
const redis = require('redis');
const { PubSub, Queue } = require('eip-redis');
const { Timer } = require('eip-timer');

const redisPub = redis.createClient();
const redisSub =  redis.createClient({return_buffers:true});

const pubSub = new PubSub(1, 1000, redisPub, redisSub, 'namespace') // eventsPerPeriod, periodInMS
const queue = new Queue(redisPub, 'namespace');
const resource = x => x;

const throttler = new eip.Route().throttleResource({ pubSub, queue, resource, timer });

License

MIT

FAQs

Package last updated on 02 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts