Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function call(Identity $identity, Request $request)
 {
     $url = Url::parse($identity->getUrl(['amqps', 'amqp']));
     $reply = $this->invoker->call($this->createRequest($request), $url->getQueryParameter('exchange', $this->exchange), $request->getMethod());
     return new Promise(function ($timeout) use($reply) {
         return $this->createResponse($reply->resolve($timeout));
     }, function () use($reply) {
         $this->invoker->dequeue($reply);
     });
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function __destruct()
 {
     $this->invoker->dequeue($this);
 }