Ejemplo n.º 1
0
 /**
  * Removes the message from the queue
  *
  * @param \Aimeos\MW\MQueue\Message\Iface $msg Message object
  * @throws \Aimeos\MW\MQueue\Exception
  */
 public function del(\Aimeos\MW\MQueue\Message\Iface $msg)
 {
     try {
         $this->channel->basic_ack($msg->getObject()->delivery_info['delivery_tag']);
     } catch (\Exception $e) {
         throw new \Aimeos\MW\MQueue\Exception($e->getMessage());
     }
 }
Ejemplo n.º 2
0
 /**
  * Removes the message from the queue
  *
  * @param \Aimeos\MW\MQueue\Message\Iface $msg Message object
  */
 public function del(\Aimeos\MW\MQueue\Message\Iface $msg)
 {
     try {
         $this->client->delete($msg->getObject());
     } catch (\Exception $e) {
         throw new \Aimeos\MW\MQueue\Exception($e->getMessage());
     }
 }
Ejemplo n.º 3
0
 /**
  * Removes the message from the queue
  *
  * @param \Aimeos\MW\MQueue\Message\Iface $msg Message object
  */
 public function del(\Aimeos\MW\MQueue\Message\Iface $msg)
 {
     try {
         $stmt = $this->conn->create($this->sql['delete']);
         $stmt->bind(1, $msg->getId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT);
         $stmt->bind(2, $this->queue);
         $stmt->execute()->finish();
     } catch (\Exception $e) {
         throw new \Aimeos\MW\MQueue\Exception($e->getMessage());
     }
 }
Ejemplo n.º 4
0
 /**
  * Removes the message from the queue
  *
  * @param \Aimeos\MW\MQueue\Message\Iface $msg Message object
  * @throws \Aimeos\MW\MQueue\Exception
  */
 public function del(\Aimeos\MW\MQueue\Message\Iface $msg)
 {
     if ($this->client->ack($msg->getObject()) === false) {
         throw new \Aimeos\MW\MQueue\Exception('Couldn\'t acknowledge frame: ' . $msg->getBody());
     }
 }