(PECL amqp >= Unknown)
AMQPExchange::delete — Delete the exchange from the broker.
Delete and exchange from the broker.
本函数还未编写文档,仅有参数列表。
The name of the exchange to delete. If the AMQPExchange object is already bound to an existing exchange and then exchange_name is not specified, the exchange bound to the AMQPExchange object will be deleted.
Optionally AMQP_IFUNUSED can be specified to indicate the exchange should not be deleted until no clients are connected to it.
成功时返回 TRUE, 或者在失败时返回 FALSE.
Example #1 AMQPExchange::delete() example
<?php
/* Create a new connection */
$cnn = new AMQPConnection();
$cnn->connect();
/* Create a new exchange */
$ex = new AMQPExchange($cnn);
$ex->declare('new_topic_exchange', AMQP_EX_TYPE_DIRECT, AMQP_DURABLE | AMQP_AUTODELETE);
/* Delete the previous exchange */
$ex2 = new AMQPExchange($cnn);
$ex2->delete('new_topic_exchange');
?>