TsgcWSPClient_AMQPMethods › Consume

Consume Method

Registers a consumer on a queue (basic.consume).

Syntax

procedure Consume(const aChannel, aQueue: string; const aConsumerTag: string = ''; aNoLocal: Boolean = false; aNoAck: Boolean = false; aExclusive: Boolean = false; aNoWait: Boolean = false; const aArguments: string = '');

Parameters

NameTypeDescription
aChannelconst stringName of the open AMQP channel on which the operation is issued.
aQueueconst stringName of the queue.
aConsumerTagconst stringConsumer identifier returned by Consume / ConsumeEx.
aNoLocalBooleanWhen True the broker does not deliver messages published on the same connection to this consumer.
aNoAckBooleanWhen True deliveries are automatically acknowledged by the broker (fire-and-forget consume).
aExclusiveBooleanWhen True the queue is restricted to the declaring connection and deleted on disconnect.
aNoWaitBooleanWhen True the client does not wait for the broker to confirm the operation.
aArgumentsconst stringOptional JSON-encoded field-table with additional arguments.

Remarks

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.

Example

sgcWSPClient_AMQP1.Consume('ch1', 'orders');

Back to Methods