public function open()
    {
        try
        {
            $additionalConnectionOptions = array();
            foreach (array('connection_timeout', 'read_write_timeout', 'keepalive', 'heartbeat') as $option) {
                if (isset($this->$option)) {
                    $additionalConnectionOptions[$option] = $this->$option;
                }
            }
            $this->AMQPConnection = new AMQPSSLConnection(
                $this->host,
                $this->port,
                $this->username,
                $this->password,
                $this->vhost,
                $this->ssl_context_options,
                $additionalConnectionOptions
            );
            $this->channel = $this->AMQPConnection->channel();
            $this->channel->queue_declare($this->queue_name, false, false, false, false);
            $this->channel->exchange_declare($this->exchange, $this->exchange_type, false, true, false);
            $this->channel->queue_bind($this->queue_name, $this->exchange);
        }
        catch (Exception $e)
        {
            throw new Exception($e);
        }
    }
public function open()
    {
        try
        {
            $additionalConnectionOptions = array();
            foreach (array('connection_timeout', 'read_write_timeout', 'keepalive', 'heartbeat') as $option) {
                if (isset($this->$option)) {
                    $additionalConnectionOptions[$option] = $this->$option;
                }
            }
            $this->AMQPConnection = new AMQPSSLConnection(
                $this->host,
                $this->port,
                $this->username,
                $this->password,
                $this->vhost,
                $this->ssl_context_options,
                $additionalConnectionOptions
            );
            $this->channel = $this->AMQPConnection->channel();
            $this->channel->queue_declare($this->queue_name, false, false, false, false);
            $this->channel->exchange_declare($this->exchange, $this->exchange_type, false, true, false);
            $this->channel->queue_bind($this->queue_name, $this->exchange);
        }
        catch (Exception $e)
        {
            throw new Exception($e);
        }
    }
public function open ( ) { try { $ additionalConnectionOptions = array ( ) ; foreach ( array ( 'connection_timeout' , 'read_write_timeout' , 'keepalive' , 'heartbeat' ) as $ option ) { if ( isset ( $ this -> $ option ) ) { $ additionalConnectionOptions [ $ option ] = $ this -> $ option ; } } $ this -> AMQPConnection = new AMQPSSLConnection ( $ this -> host , $ this -> port , $ this -> username , $ this -> password , $ this -> vhost , $ this -> ssl_context_options , $ additionalConnectionOptions ) ; $ this -> channel = $ this -> AMQPConnection -> channel ( ) ; $ this -> channel -> queue_declare ( $ this -> queue_name , false , false , false , false ) ; $ this -> channel -> exchange_declare ( $ this -> exchange , $ this -> exchange_type , false , true , false ) ; $ this -> channel -> queue_bind ( $ this -> queue_name , $ this -> exchange ) ; } catch ( Exception $ e ) { throw new Exception ( $ e ) ; } }
Open a connection with the RabbitMQ Server

@return void
Open a connection with the RabbitMQ Server