TsgcWSPClient_AMQPMethods › PurgeQueueEx

PurgeQueueEx Method

Purges a queue synchronously and returns True on queue.purge-ok.

Syntax

function PurgeQueueEx(const aChannel, aQueue: string; aNoWait: Boolean = false; aTimeout: Integer = CS_AMQP_DEFAULT_TIMEOUT): Boolean;

Parameters

NameTypeDescription
aChannelconst stringName of the open AMQP channel on which the operation is issued.
aQueueconst stringName of the queue.
aNoWaitBooleanWhen True the client does not wait for the broker to confirm the operation.
aTimeoutIntegerMaximum time in milliseconds to wait for the broker confirmation before returning False.

Return Value

True when the broker acknowledged the purge within aTimeout. (Boolean)

Remarks

Extended synchronous variant of PurgeQueue. The OnAMQPQueuePurge event reports the number of messages removed by the broker.

Example

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

Back to Methods