Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function call(LocationInterface $location, Request $request)
 {
     $reply = $this->invoker->call($this->createMessage($location, $request), $this->exchange, $request->getTopic());
     return new Response\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);
 }