Disque client
This module is a relatively thin wrapper around the node_redis client to enable use of Disque.
Usage
var Disque = ; var disque = servers: port: 7711 host: '127.0.0.1' ; disque;
Servers
Servers in the cluster will be automatically connected to (via the response of cluster nodes
). Of course, to allow discovery there must be at least one server specified in the configuration.
Client creation
By default, clients will be created using Redis.createClient(port, host)
. This can be overridden by providing a function which must return a node_redis client. Clients are cached so only one connection will be made to each server.
var Disque = ;var RedisClient = ;var disque = servers: ... { // this is the default behaviour return RedisClient; };