/** * {@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); }); }
/** * {@inheritdoc} */ public function __destruct() { $this->invoker->dequeue($this); }