TsgcWSPClient_AMQPMethods › DeleteExchange

DeleteExchange Method

Deletes an exchange (exchange.delete).

Syntax

procedure DeleteExchange(const aChannel, aExchange: string; aIfUnused: Boolean = false; aNoWait: Boolean = false);

Parameters

NameTypeDescription
aChannelconst stringName of the open AMQP channel on which the operation is issued.
aExchangeconst stringName of the exchange.
aIfUnusedBooleanWhen True the operation proceeds only if the object has no bindings/consumers.
aNoWaitBooleanWhen True the client does not wait for the broker to confirm the operation.

Remarks

Removes the named exchange from the broker. When aIfUnused is True, the delete only succeeds if the exchange has no bindings, protecting against accidental data loss.

Example

sgcWSPClient_AMQP1.DeleteExchange('ch1', 'ex.orders', True);

Back to Methods