function Context(url) {
  EventEmitter.call(this);
  var self = this;
  var promise = this._connection = amqp.connect(url, {});
  promise.then(function (conn) {
    conn.on('error', bindEvent(self, 'error'));
    conn.on('close', bindEvent(self, 'close'));
  }, bindEvent(self, 'error'));
  promise.then(bindEvent(this, 'ready'));
}
/**
 * Create a context for the connection with the message bus
 * @param url
 * @constructor
 */
Create a context for the connection with the message bus
@param url
@constructor
Create a context for the connection with the message bus @param url @constructor
function Context(url) {
  EventEmitter.call(this);
  var self = this;
  var promise = this._connection = amqp.connect(url, {});
  promise.then(function (conn) {
    conn.on('error', bindEvent(self, 'error'));
    conn.on('close', bindEvent(self, 'close'));
  }, bindEvent(self, 'error'));
  promise.then(bindEvent(this, 'ready'));
}
function Context ( url ) { EventEmitter . call ( this ) ; var self = this ; var promise = this . _connection = amqp . connect ( url , { } ) ; promise . then ( function ( conn ) { conn . on ( 'error' , bindEvent ( self , 'error' ) ) ; conn . on ( 'close' , bindEvent ( self , 'close' ) ) ; } , bindEvent ( self , 'error' ) ) ; promise . then ( bindEvent ( this , 'ready' ) ) ; }
Create a context for the connection with the message bus
 @param url
 @constructor
Create a context for the connection with the message bus @param url @constructor