TsgcWSPClient_AMQP › Methods › DeclareExchangeEx
Declares an exchange synchronously, waiting for exchange.declare-ok.
function DeclareExchangeEx(const aChannel, aExchange: string; const aExchangeType: string = ''; aPassive: Boolean = false; aDurable: Boolean = false; aAutoDelete: Boolean = false; aInternal: Boolean = false; aNoWait: Boolean = false; aTimeout: Integer = CS_AMQP_DEFAULT_TIMEOUT; const aArguments: string = ''): Boolean;
| Name | Type | Description |
|---|---|---|
aChannel | const string | Name of the open AMQP channel on which the operation is issued. |
aExchange | const string | Name of the exchange. |
aExchangeType | const string | Exchange type: direct, topic, fanout or headers. |
aPassive | Boolean | When True the broker checks whether the object exists and raises an error if it does not, without creating it. |
aDurable | Boolean | When True the object survives broker restarts. |
aAutoDelete | Boolean | When True the object is deleted once the last client stops using it. |
aInternal | Boolean | When True the exchange is reserved for broker-internal use and cannot receive direct publishes. |
aNoWait | Boolean | When True the client does not wait for the broker to confirm the operation. |
aTimeout | Integer | Maximum time in milliseconds to wait for the broker confirmation before returning False. |
aArguments | const string | Optional JSON-encoded field-table with additional arguments. |
True when the broker acknowledged the exchange declaration within aTimeout. (Boolean)
Extended synchronous variant of DeclareExchange. Returns True once the broker has acknowledged the declaration; returns False on timeout or declaration mismatch.
if sgcWSPClient_AMQP1.DeclareExchangeEx('ch1', 'ex.orders', 'topic', False, True) then
;