TsgcWSPClient_AMQPMethods › CancelConsumeEx

CancelConsumeEx Method

Cancels a consumer synchronously and returns True on basic.cancel-ok.

Syntax

function CancelConsumeEx(const aChannel, aConsumerTag: string; aTimeout: Integer = CS_AMQP_DEFAULT_TIMEOUT): Boolean;

Parameters

NameTypeDescription
aChannelconst stringName of the open AMQP channel on which the operation is issued.
aConsumerTagconst stringConsumer identifier returned by Consume / ConsumeEx.
aTimeoutIntegerMaximum time in milliseconds to wait for the broker confirmation before returning False.

Return Value

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

Remarks

Extended synchronous variant of CancelConsume. Blocks until the broker confirms the cancellation or until aTimeout expires.

Example

sgcWSPClient_AMQP1.CancelConsumeEx('ch1', 'tag-1');

Back to Methods