예제 #1
0
 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
 /**
  * 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;
 }
예제 #3
0
파일: Stomp.php 프로젝트: phpwutz/stomp-php
 /**
  * Graceful disconnect from the server
  *
  */
 public function disconnect()
 {
     try {
         if ($this->connection && $this->connection->isConnected()) {
             if ($this->protocol) {
                 $this->sendFrame($this->protocol->getDisconnectFrame(), false);
             }
             $this->connection->disconnect();
         }
     } catch (StompException $ex) {
         // nothing!
     }
     $this->sessionId = null;
     $this->subscriptions = array();
     $this->unprocessedFrames = array();
     $this->protocol = null;
 }