disque.js
A simple Disque client for Node.js and io.js.
Currently under development, but it's already usable and useful.
Inspired by redic.js (which is inspired by Redic).
Usage
var disque = ;var client = disque; client; // Meanwhile in a parallel universeclient;
If you need to use authentication, pass in the auth
option:
var client = disque;
Features
-
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.
Roadmap
- Make all methods optionally return a Promise.
- Keep a stats counter by queue name?
License
MIT.
Originally forked from Cyril David's redic.js.