Remove a routing key binding on an another exchange from the given exchange.
public unbind ( string $exchange_name, string $routing_key = '', array $arguments = [] ) : boolean | ||
$exchange_name | string | Name of the exchange to bind. |
$routing_key | string | The routing key to use for binding. |
$arguments | array | Additional binding arguments. |
return | boolean | true on success or false on failure. |
/** * @param Exchange|string $exchange * @param string $routingKey * @param array $arguments * * @return bool */ public function unbind($exchange, $routingKey = '', array $arguments = []) { $exchange = AmqpHelper::getExchangeName($exchange); try { return $this->rawExchange->unbind($exchange, $routingKey, $arguments); } catch (\Exception $e) { ClientHelper::throwRightException($e); } }
/** * @inheritdoc */ public function unbind($exchangeName, $routingKey, array $arguments = []) { try { return $this->delegate->unbind($exchangeName, $routingKey, $arguments); } catch (\AMQPExchangeException $e) { throw new ExchangeException($e->getMessage(), $e->getCode(), $e); } catch (\AMQPChannelException $e) { throw new ChannelException($e->getMessage(), $e->getCode(), $e); } catch (\AMQPConnectionException $e) { throw new ConnectionException($e->getMessage(), $e->getCode(), $e); } }
/** * @inheritdoc */ public function unbind(string $exchangeName, string $routingKey = '', array $arguments = []) { $this->exchange->unbind($exchangeName, $routingKey, $arguments); }