TsgcWSPClient_AMQP › Methods › ConsumeEx
Registers a consumer synchronously and returns True on basic.consume-ok.
function ConsumeEx(const aChannel, aQueue: string; const aConsumerTag: string = ''; aNoLocal: Boolean = false; aNoAck: Boolean = false; aExclusive: 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. |
aConsumerTag | const string | Consumer identifier returned by Consume / ConsumeEx. |
aNoLocal | Boolean | When True the broker does not deliver messages published on the same connection to this consumer. |
aNoAck | Boolean | When True deliveries are automatically acknowledged by the broker (fire-and-forget consume). |
aExclusive | Boolean | When True the queue is restricted to the declaring connection and deleted on disconnect. |
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 confirmed the consumer registration within aTimeout. (Boolean)
Extended synchronous variant of Consume. Waits for the broker to acknowledge the consumer before returning.
if sgcWSPClient_AMQP1.ConsumeEx('ch1', 'orders', 'tag-1') then
;