Esempio n. 1
0
 /**
  * Apollo unsubscribe frame.
  *
  * @param string $destination
  * @param string $subscriptionId
  * @param bool|false $durable
  * @return \Stomp\Transport\Frame
  */
 public function getUnsubscribeFrame($destination, $subscriptionId = null, $durable = false)
 {
     $frame = parent::getUnsubscribeFrame($destination, $subscriptionId);
     if ($durable) {
         $frame['persistent'] = 'true';
     }
     return $frame;
 }
Esempio n. 2
0
 /**
  * ActiveMq unsubscribe frame.
  *
  * @param string $destination
  * @param string $subscriptionId
  * @param bool|false $durable
  * @return Frame
  */
 public function getUnsubscribeFrame($destination, $subscriptionId = null, $durable = false)
 {
     $frame = parent::getUnsubscribeFrame($destination, $subscriptionId);
     if ($durable) {
         $frame['activemq.subscriptionName'] = $this->getClientId();
     }
     return $frame;
 }
Esempio n. 3
0
 public function actionToProtocolProvider()
 {
     $protocol = new Protocol('test', Version::VERSION_1_2);
     return ['subscribe' => ['subscribe', ['/test/queue', 55, 'auto', 'S=5', ['myHeader' => 'myHeaderValue']], [$protocol->getSubscribeFrame('/test/queue', 55, 'auto', 'S=5')->addHeaders(['myHeader' => 'myHeaderValue']), null], true], 'unsubscribe' => ['unsubscribe', ['/test/queue', 44, ['myHeader' => 'myHeaderValue']], [$protocol->getUnsubscribeFrame('/test/queue', 44)->addHeaders(['myHeader' => 'myHeaderValue']), null], true], 'begin' => ['begin', [11211], [$protocol->getBeginFrame(11211), false], true], 'commit' => ['commit', [2211], [$protocol->getCommitFrame(2211), false], true], 'abort' => ['abort', [1122], [$protocol->getAbortFrame(1122), false], true], 'ack' => ['ack', [new Frame('MESSAGE', ['id' => 121])], [$protocol->getAckFrame(new Frame('MESSAGE', ['id' => 121])), false], null], 'nack' => ['nack', [new Frame('MESSAGE', ['ack' => 212])], [$protocol->getNackFrame(new Frame('MESSAGE', ['ack' => 212])), false], null]];
 }