コード例 #1
0
ファイル: ActiveMq.php プロジェクト: vasiliyyudin/stomp-php
 public function getUnsubscribeFrame($destination, array $headers = array(), $durable = false)
 {
     $frame = parent::getUnsubscribeFrame($destination, $headers, $durable);
     if ($this->hasClientId() && $durable) {
         $frame->setHeader('activemq.subscriptionName', $this->getClientId());
     }
     return $frame;
 }
コード例 #2
0
ファイル: Stomp.php プロジェクト: phpwutz/stomp-php
 /**
  * Remove an existing subscription
  *
  * @param string $destination
  * @param array $properties
  * @param boolean $sync Perform request synchronously
  * @param boolean $durable durable subscription
  * @return boolean
  * @throws StompException
  */
 public function unsubscribe($destination, $properties = null, $sync = null, $durable = false)
 {
     $unsubscribe = $this->sendFrame($this->protocol->getUnsubscribeFrame($destination, $properties ?: array(), $durable), $sync);
     if ($unsubscribe) {
         $this->subscriptions[$destination] = false;
     }
     return $unsubscribe;
 }
コード例 #3
0
ファイル: RabbitMq.php プロジェクト: vasiliyyudin/stomp-php
 /**
  * RabbitMq unsubscribe frame.
  *
  * @param string $destination
  * @param array $headers
  * @param boolean $durable durable subscription
  * @return Frame
  */
 public function getUnsubscribeFrame($destination, array $headers = array(), $durable = false)
 {
     $frame = parent::getUnsubscribeFrame($destination, $headers);
     $this->addClientId($frame);
     if ($durable) {
         $frame->setHeader('persistent', 'true');
     }
     return $frame;
 }