Redis Queue for jobs
Last updated 2 years ago by yogeshyadav108098 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @evolving-bubble/redis-q 
SYNC missed versions from official npm registry.

Redis-Q Job Manager

Manage jobs using redis queues


In normal scenario, tracking and processing job is little typical. This library is trageted to make that simpler and effective


  1. Create a job.
  2. Delete a job.
  3. Track a job progress.
  4. Generate job reports

Getting started.

Redis-Q Job manager will work on all systems which can run node.


npm install @evolving-bubble/redis-q



  • Create a publisher

Will create a publisher connection with redis, when redis isReady we can start pushing data

const JobManager = require('@evolving-bubble/redis-q')
const publisher = new JobManager.Publisher({
    redis: {
        connectionType: 'NORMAL',
        host: 'localhost',
        port: '6379',
    jobPrefix: 'JobManager'

    publisher.push([{ 1: 1, 2: 2 }]);
  • Create a db publisher

Will create a DB publisher connection with redis, when redis isReady we can start pushing data, it will fetch data from db using searchOptions and will push in redis as part of job

const JobManager = require('@evolving-bubble/redis-q')
const dBPublisher = new JobManager.DbPublisher({
    jobName: 'test-DBPublisher',
    schedulerTime: '*/1 * * * * *', // Every 10 secs
    db: {
        host: 'localhost',
        port: '3306',
        user: 'username',
        password: 'password',
        database: 'testDatabase',
        table: 'testTable',
        tableFields: [
                key: 'order_id',
                type: 'varchar'
                key: 'customer_id',
                type: 'varchar'
        searchOptions: [{
            key: 'order_id',
            operator: 'eq',
            value: '4295046610'
    redis: {
        host: 'localhost',
        port: '6379',
        connectionType: 'NORMAL'
    jobPrefix: 'JobManager'

  • Create a subscriber

Will create a subscriber that will be listening to queues and will run the callback if some message gets added to Queue

const JobManager = require('@evolving-bubble/redis-q')
const subscriber = new JobManager.Subscriber({
    redis: {
        connectionType: 'NORMAL',
        host: 'localhost',
        port: '6379',
    jobPrefix: 'JobManager',
    callback: (message) => {
        return new Promise((resolve, reject) => {
                .then(() => {
                    return resolve();
                .catch((error) => {
                    return reject(error);
    callbackTimeOut: 2 * 1000
  • Create a job

Will create a job object to track job progress and to generate reports

const job = new Job({
    redis: {
        connectionType: 'NORMAL',
        host: 'localhost',
        port: '6379',
    jobPrefix: 'JobManager'

setTimeout(() => {
}, 1000);

How to contribute

Have an idea? Found a bug? See how to contribute.

Have a problem? Come chat with us!


Maintained by

Yogesh Yadav

Support my projects

I open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).

However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:

  • Starring and sharing the projects you like
  • Paytm You can make one-time donations via Paytm (+91-7411000282). I'll probably buy a coffee.
  • UPI You can make one-time donations via UPI (7411000282@paytm).
  • Bitcoin You can send me bitcoins at this address (or scanning the code below): 3BKvX4Rck6B69JZMuPFFCPif4dSctSxJQ5


Where is this library used?

If you are using this library in one of your projects, add it here.


MIT © Yogesh Yadav

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

2 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 1
Dependencies (9)
Dev Dependencies (0)
Dependents (0)

Copyright 2014 - 2017 © taobao.org |