TsgcWSPClient_AMQP › Methods › DeclareQueueEx
Declares a queue synchronously, waiting for queue.declare-ok.
function DeclareQueueEx(const aChannel, aQueue: string; aPassive: Boolean = false; aDurable: Boolean = false; aExclusive: Boolean = false; aAutoDelete: 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. |
aQueue | const string | Name of the queue. |
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. |
aExclusive | Boolean | When True the queue is restricted to the declaring connection and deleted on disconnect. |
aAutoDelete | Boolean | When True the object is deleted once the last client stops using it. |
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 declaration within aTimeout. (Boolean)
Extended synchronous variant of DeclareQueue. The queue.declare-ok frame also carries message-count/consumer-count which is reported through OnAMQPQueueDeclare.
if sgcWSPClient_AMQP1.DeclareQueueEx('ch1', 'orders', False, True) then
sgcWSPClient_AMQP1.BindQueue('ch1', 'orders', 'ex.orders', 'orders.*');