Skip to content
A minimalistic Disque client using modern Node.js.
Branch: master
Clone or download
Pull request Compare This branch is 37 commits ahead of cyx:master.


A simple Disque client for Node.js.

Currently under development, but it's already usable and useful.


const Disq   = require('disq');
const disque = new Disq({ nodes: [ '', '' ] });

disque.addjob('queue1', 'foo')
  .then(function(jobID) {
    console.log(`Added job with ID ${jobID}`);

// Meanwhile in a parallel universe
  .then(function(jobs) {
    jobs.forEach(function(job) {

        .then(function() {
          console.log(`Processed job ${}`);

If you need to use authentication, pass in the auth option:

const disque = new Disq({ auth: 'foobar' });


  • Automatic connection to the most convenient node in the cluster.

    While consuming jobs with disque.getjob, the client will periodically check which node is producing the most jobs. In order to consume these more efficiently and to minimize message exchange in the cluster, the client will automatically reconnect to this node.

    The frequency of this check is configurable via the cycle option.

    Note that we limit this automatic reconnection to the initial node list you provide on connect.


  • Keep a stats counter by queue name?


After seeing that disque was squatted on npm, I named this library disque.js. That was before I could tell how weird that name was in npm-land. So on July 2016, together with a major rewrite, I renamed the library to disq.



Originally forked from Cyril David's redic.js.

You can’t perform that action at this time.