public function connect() {
        $readWriteTimeout = max($this->read_timeout, $this->write_timeout); //?
        try {
            $this->connection = new AMQPStreamConnection(
                $this->host,
                $this->port,
                $this->login,
                $this->password,
                $this->vhost,
                false,                      //insist
                'AMQPLAIN',                 //login method
                null,                       //login response
                'en_US',                    //locale
                $this->connect_timeout,     // connect_timeout
                $readWriteTimeout,          // read_write_timeout
                null,                       // context
                $this->keepalive,           // keepalive
                $this->heartbeat            // heartbeat configuration
            );

            //Several exception types might be thrown
        } catch (Exception $e){
            throw new AMQPConnectionException($e->getMessage(), $e->getCode(), $e->getPrevious());
        }
    }
public function connect() {
        $readWriteTimeout = max($this->read_timeout, $this->write_timeout); //?
        try {
            $this->connection = new AMQPStreamConnection(
                $this->host,
                $this->port,
                $this->login,
                $this->password,
                $this->vhost,
                false,                      //insist
                'AMQPLAIN',                 //login method
                null,                       //login response
                'en_US',                    //locale
                $this->connect_timeout,     // connect_timeout
                $readWriteTimeout,          // read_write_timeout
                null,                       // context
                $this->keepalive,           // keepalive
                $this->heartbeat            // heartbeat configuration
            );

            //Several exception types might be thrown
        } catch (Exception $e){
            throw new AMQPConnectionException($e->getMessage(), $e->getCode(), $e->getPrevious());
        }
    }
public function connect ( ) { $ readWriteTimeout = max ( $ this -> read_timeout , $ this -> write_timeout ) ; //? try { $ this -> connection = new AMQPStreamConnection ( $ this -> host , $ this -> port , $ this -> login , $ this -> password , $ this -> vhost , false , //insist 'AMQPLAIN' , //login method null , //login response 'en_US' , //locale $ this -> connect_timeout , // connect_timeout $ readWriteTimeout , // read_write_timeout null , // context $ this -> keepalive , // keepalive $ this -> heartbeat // heartbeat configuration ) ; //Several exception types might be thrown } catch ( Exception $ e ) { throw new AMQPConnectionException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e -> getPrevious ( ) ) ; } }
Establish a transient connection with the AMQP broker.

This method will initiate a connection with the AMQP broker.

@throws AMQPConnectionException
@return boolean TRUE on success or throw an exception on failure.
Establish a transient connection with the AMQP broker .