(PECL amqp >= Unknown)
AMQPExchange::delete — Delete the exchange from the broker.
Delete and exchange from the broker.
Elenco dei parametri
AMQP_IFUNUSEDcan be specified to indicate the exchange should not be deleted until no clients are connected to it.
Throws AMQPExchangeException on failure.
Throws AMQPChannelException if the channel is not open.
Throws AMQPConnectionException if the connection to the broker was lost.
TRUE in caso di successo,
FALSE in caso di fallimento.
Example #1 AMQPExchange::delete() example
/* Create a new connection */
$cnn = new AMQPConnection();
/* 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);