RabbitMq.php
/**
     * Creates connection and channel, declares persistent queue
     * @param array $config connection params
     * @param string $queue queue name
     */
Creates connection and channel, declares persistent queue
@param array $config connection params
@param string $queue queue name
Creates connection and channel declares persistent queue @param array $config connection params @param string $queue queue name
public function init()
    {
        try {
            $this->connection = new AMQPConnection($this->host, $this->port, $this->username, $this->password);
            $this->channel = $this->connection->channel();
            $this->channel->queue_declare($this->queue, false, true, false, false);
        } catch (Exception $e) {
            if (empty($this->file)) {
                throw $e;
            }
        }
    }
public function init ( ) { try { $ this -> connection = new AMQPConnection ( $ this -> host , $ this -> port , $ this -> username , $ this -> password ) ; $ this -> channel = $ this -> connection -> channel ( ) ; $ this -> channel -> queue_declare ( $ this -> queue , false , true , false , false ) ; } catch ( Exception $ e ) { if ( empty ( $ this -> file ) ) { throw $ e ; } } }
Creates connection and channel, declares persistent queue
 @param array $config connection params
 @param string $queue queue name
Creates connection and channel declares persistent queue @param array $config connection params @param string $queue queue name
// if backup file isn't set - throw exception