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.

1.7.1
latest
Source
npmnpm
Version published
Weekly downloads
7
600%
Maintainers
1
Weekly downloads
 
Created
Source

eip-redis

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 15 Jan 2018

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.