New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

redis-event-queue

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-event-queue

Interprocess queue based on Redis that implements EventEmitter interface

latest
Source
npmnpm
Version
1.1.5
Version published
Maintainers
1
Created
Source

redis-event-queue

Interprocess queue based on Redis that implements EventEmitter interface

Install

npm install --save redis-event-queue

Usage

Emmiter

var req = require('redis-event-queue')(options);

var wqueue = req.workqueue;
var bqueue = req.broadcast;

for(var i = 0; i < 10; i++) {
  wqueue.emit('event', 'work msg '+i);
  bqueue.emit('event', 'broad msg '+i);
}

Listener

var req = require('redis-event-queue')(options);

var wqueue = req.workqueue;
var bqueue = req.broadcast;

wqueue.on('event', function(msg) {
  console.log('work: '+msg);
});

bqueue.on('event', function(msg) {
  console.log('broad: '+msg);
});

options

  • prefix: Set keys prefix to use in redis.

All other options are the same as described in redis.

workqueue

Delivers a message to the first process available

broadcast

Delivers a message to all processes listening

#Next

Add optional pattern to listen to messages in workqueue an broadcast

#Suggestions

If you have any suggestions, comments or bug reports, please add an issue in github or PR directly!

Thanks.

Keywords

redis

FAQs

Package last updated on 27 Sep 2016

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