Example #1
0
 /**
  * @param mixed  $message
  * @param string $routingKey
  * @param int    $flags
  * @param array  $attributes
  *
  * @return bool
  */
 public function publish($message, $routingKey = null, $flags = Client::NOPARAM, array $attributes = [])
 {
     try {
         return $this->rawExchange->publish($this->encodeStrategy->encode($message), $routingKey, $flags, $attributes);
     } catch (\Exception $e) {
         ClientHelper::throwRightException($e);
     }
 }
Example #2
0
 /**
  * @return bool
  */
 public function rollbackTransaction()
 {
     try {
         return $this->rawChannel->rollbackTransaction();
     } catch (\Exception $e) {
         ClientHelper::throwRightException($e);
     }
 }
Example #3
0
 public function reconnect()
 {
     try {
         $this->rawConnection->reconnect();
     } catch (\AMQPConnectionException $e) {
         ClientHelper::throwRightException($e);
     }
 }
Example #4
0
 /**
  * @param int $flags
  *
  * @return int
  */
 public function delete($flags = Client::NOPARAM)
 {
     try {
         return $this->rawQueue->delete($flags);
     } catch (\Exception $e) {
         ClientHelper::throwRightException($e);
     }
 }