TsgcWSPClient_AMQP › Methods › Consume
Registers a consumer on a queue (basic.consume).
procedure Consume(const aChannel, aQueue: string; const aConsumerTag: string = ''; aNoLocal: Boolean = false; aNoAck: Boolean = false; aExclusive: 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. |
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. |
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. |
Starts a message flow from the named queue to the OnAMQPBasicDeliver event. When aConsumerTag is empty the broker assigns one automatically and returns it via OnAMQPBasicConsume.
sgcWSPClient_AMQP1.Consume('ch1', 'orders');