RabbitMq.php
/**
     * Publishes persistent message to queue
     * @param string $message
     * @param int $deliveryMode
     * @return boolean
     */
Publishes persistent message to queue
@param string $message
@param int $deliveryMode
@return boolean
Publishes persistent message to queue @param string $message @param int $deliveryMode @return boolean
public function publish($message, $deliveryMode = 2)
    {
        if (!is_null($this->channel)) {
            try {
                $msg = new AMQPMessage($message, array('delivery_mode' => $deliveryMode));
                $this->channel->basic_publish($msg, '', $this->queue);
            } catch (Exception $e) {
                if (!empty($this->file)) {
                    return $this->putToBackupFile($message);
                } 
                throw $e;
            }
            return true;
        } else if (!empty($this->file)) {
            return $this->putToBackupFile($message);
        } else {
            return false;
        }
    }
public function publish ( $ message , $ deliveryMode = 2 ) { if ( ! is_null ( $ this -> channel ) ) { try { $ msg = new AMQPMessage ( $ message , array ( 'delivery_mode' => $ deliveryMode ) ) ; $ this -> channel -> basic_publish ( $ msg , '' , $ this -> queue ) ; } catch ( Exception $ e ) { if ( ! empty ( $ this -> file ) ) { return $ this -> putToBackupFile ( $ message ) ; } throw $ e ; } return true ; } else if ( ! empty ( $ this -> file ) ) { return $ this -> putToBackupFile ( $ message ) ; } else { return false ; } }
Publishes persistent message to queue
 @param string $message
 @param int $deliveryMode
 @return boolean
Publishes persistent message to queue @param string $message @param int $deliveryMode @return boolean