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