lib/common/connection.js
function Connection (options, clientOptions, label) {
        this.options = options;
        this.clientOptions = clientOptions;
        this.label = label;
        this.initialConnection = false;
        this.initialConnectionRetries = 0;
        this.maxConnectionRetries = 60;

        Object.defineProperty(this, 'exchanges', {
            get: function () {
                if (this.connection) {
                    return this.connection.exchanges;
                }
            }
        });

        Object.defineProperty(this, 'connected', {
            get: function () {
                return this.connection !== undefined;
            }
        });
    }
function Connection (options, clientOptions, label) {
        this.options = options;
        this.clientOptions = clientOptions;
        this.label = label;
        this.initialConnection = false;
        this.initialConnectionRetries = 0;
        this.maxConnectionRetries = 60;

        Object.defineProperty(this, 'exchanges', {
            get: function () {
                if (this.connection) {
                    return this.connection.exchanges;
                }
            }
        });

        Object.defineProperty(this, 'connected', {
            get: function () {
                return this.connection !== undefined;
            }
        });
    }
function Connection ( options , clientOptions , label ) { this . options = options ; this . clientOptions = clientOptions ; this . label = label ; this . initialConnection = false ; this . initialConnectionRetries = 0 ; this . maxConnectionRetries = 60 ; Object . defineProperty ( this , 'exchanges' , { get : function ( ) { if ( this . connection ) { return this . connection . exchanges ; } } } ) ; Object . defineProperty ( this , 'connected' , { get : function ( ) { return this . connection !== undefined ; } } ) ; }
Connection provides a wrapper around the AMQP connection logic
which presents a simplified interface for using multiple connections
in the messenger.
@param {Object} options       node-amqp createConnection options.
@param {type} [clientOptions] node-amqp createConnection client options.
Connection provides a wrapper around the AMQP connection logic which presents a simplified interface for using multiple connections in the messenger .