Skip to content
rapid.queue is a lightweight boss+queue+workers system built on node.js with a redis backend.
Find file
Latest commit 2bb9520 @Swizec Merge branch 'development'
Failed to load latest commit information.
tests worker tests passing readme update
assistant.js needed more logs
boss.js boss only publishes message with probability less than 20%
ceo.js ceo had wrong function to restart boss
foreman.js restart implemented
logging.js configurable logging and max log length
worker.js if queue is empty, poll in 5s even if no message received


The general idea of rapid.queue is helping people write async API's.

The way it works is:

  • listen for incoming http connections
  • get tasks from http
  • push tasks to queue
  • multiple workers pull from queue
  • once a worker is done, post result over http back to client


The settings.js file contains some basic configuration options.

Run a redis server with default configuration. Run the boss.js with port and listening ip node boss.js 8124 Run foreman.js and it will start the workers and make sure they keep running

To get a list of tasks in a certain queue just access boss.js from your browser with a queue argument, something like so:

You can see the logs by going to: /?list=logs


To add a task to the server send a POST request to your configured listener address with the following JSON data in the body:

{callback: '<where to post result>',
 queue: '<name of queue>',
 parameters: <add any other parameters>}

The task will be passed to your chosen worker function.

When processing the task is complete the same task with an added result parameter:

{callback: '<where to post result>',
 queue: '<name of queue>',
 parameters: <your parameters>,
 result: <output of your worker>}


Something went wrong with that request. Please try again.