public function connect()
    {
        $connection = $this->_connection;
        $connection->setLogin($this->_config['user']);
        $connection->setPassword($this->_config['password']);
        $connection->setHost($this->_config['host']);
        $connection->setPort($this->_config['port']);
        $connection->setVhost($this->_config['vhost']);
        $connection->setReadTimeout($this->_config['readTimeout']);

        # You shall not use persistent connections
        #
        # AMQPChannelException' with message 'Could not create channel. Connection has no open channel slots remaining
        #
        # The PECL extension is foobar, http://stackoverflow.com/questions/23864647/how-to-avoid-max-channels-per-tcp-connection-with-amqp-php-persistent-connectio
        #

        $connection->connect();
    }
public function connect()
    {
        $connection = $this->_connection;
        $connection->setLogin($this->_config['user']);
        $connection->setPassword($this->_config['password']);
        $connection->setHost($this->_config['host']);
        $connection->setPort($this->_config['port']);
        $connection->setVhost($this->_config['vhost']);
        $connection->setReadTimeout($this->_config['readTimeout']);

        # You shall not use persistent connections
        #
        # AMQPChannelException' with message 'Could not create channel. Connection has no open channel slots remaining
        #
        # The PECL extension is foobar, http://stackoverflow.com/questions/23864647/how-to-avoid-max-channels-per-tcp-connection-with-amqp-php-persistent-connectio
        #

        $connection->connect();
    }
public function connect ( ) { $ connection = $ this -> _connection ; $ connection -> setLogin ( $ this -> _config [ 'user' ] ) ; $ connection -> setPassword ( $ this -> _config [ 'password' ] ) ; $ connection -> setHost ( $ this -> _config [ 'host' ] ) ; $ connection -> setPort ( $ this -> _config [ 'port' ] ) ; $ connection -> setVhost ( $ this -> _config [ 'vhost' ] ) ; $ connection -> setReadTimeout ( $ this -> _config [ 'readTimeout' ] ) ; # You shall not use persistent connections # # AMQPChannelException' with message 'Could not create channel. Connection has no open channel slots remaining # # The PECL extension is foobar, http://stackoverflow.com/questions/23864647/how-to-avoid-max-channels-per-tcp-connection-with-amqp-php-persistent-connectio # $ connection -> connect ( ) ; }
Connects to RabbitMQ

@return void
Connects to RabbitMQ