TsgcWSPClient_AMQP › Methods › DeclareExchange
Declares an exchange on the broker (exchange.declare).
procedure DeclareExchange(const aChannel, aExchange: string; const aExchangeType: string = ''; aPassive: Boolean = false; aDurable: Boolean = false; aAutoDelete: Boolean = false; aInternal: Boolean = false; aNoWait: Boolean = false; const aArguments: string = '');
| 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. |
aArguments | const string | Optional JSON-encoded field-table with additional arguments. |
Creates the exchange if it does not exist, or validates its properties if it does. Supports all standard AMQP 0-9-1 exchange types (direct, topic, fanout, headers).
sgcWSPClient_AMQP1.DeclareExchange('ch1', 'ex.orders', 'topic', False, True);