TsgcWSPClient_AMQPMethods › ConsumeEx

ConsumeEx Method

Registers a consumer synchronously and returns True on basic.consume-ok.

Syntax

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;

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.
aTimeoutIntegerMaximum time in milliseconds to wait for the broker confirmation before returning False.
aArgumentsconst stringOptional JSON-encoded field-table with additional arguments.

Return Value

True when the broker confirmed the consumer registration within aTimeout. (Boolean)

Remarks

Extended synchronous variant of Consume. Waits for the broker to acknowledge the consumer before returning.

Example

if sgcWSPClient_AMQP1.ConsumeEx('ch1', 'orders', 'tag-1') then
  ;

Back to Methods