lib/connection.js
function Connection(index, bus) {
  events.EventEmitter.call(this);
  this.setMaxListeners(0); // remove limit on listeners
  this.index = index;
  this.id = bus.id + ":connection:" + index;
  this.urls = bus.options.redis;
  this.redisOptions = bus.options.redisOptions || {};
  this.layout = bus.options.layout;
  this.driver = bus.driver;
  this._logger = bus.logger.withTag(this.id);
  this.connected = false;
  this.ready = 0;
  this.pendingCommands = [];
  this.subscribers = {};
}
function Connection(index, bus) {
  events.EventEmitter.call(this);
  this.setMaxListeners(0); // remove limit on listeners
  this.index = index;
  this.id = bus.id + ":connection:" + index;
  this.urls = bus.options.redis;
  this.redisOptions = bus.options.redisOptions || {};
  this.layout = bus.options.layout;
  this.driver = bus.driver;
  this._logger = bus.logger.withTag(this.id);
  this.connected = false;
  this.ready = 0;
  this.pendingCommands = [];
  this.subscribers = {};
}
function Connection ( index , bus ) { events . EventEmitter . call ( this ) ; this . setMaxListeners ( 0 ) ; // remove limit on listeners this . index = index ; this . id = bus . id + ":connection:" + index ; this . urls = bus . options . redis ; this . redisOptions = bus . options . redisOptions || { } ; this . layout = bus . options . layout ; this . driver = bus . driver ; this . _logger = bus . logger . withTag ( this . id ) ; this . connected = false ; this . ready = 0 ; this . pendingCommands = [ ] ; this . subscribers = { } ; }
A connection to redis.
Connects to redis with a write connection and a read connection.
The write connection is used to emit commands to redis.
The read connection is used to listen for events.
This is required because once a connection is used to wait for events
it cannot be used to issue further requests.
@param index the index of the connection within the hosting bus
@param bus the bus object using the connection
@constructor
A connection to redis . Connects to redis with a write connection and a read connection . The write connection is used to emit commands to redis . The read connection is used to listen for events . This is required because once a connection is used to wait for events it cannot be used to issue further requests .