TsgcWSPClient_AMQPMethods › OpenChannelEx

OpenChannelEx Method

Opens a new AMQP channel synchronously, waiting for channel.open-ok.

Syntax

function OpenChannelEx(const aChannel: string; aTimeout: Integer = CS_AMQP_DEFAULT_TIMEOUT): Boolean;

Parameters

NameTypeDescription
aChannelconst stringName of the open AMQP channel on which the operation is issued.
aTimeoutIntegerMaximum time in milliseconds to wait for the broker confirmation before returning False.

Return Value

True when the broker opened the channel within aTimeout, False on timeout. (Boolean)

Remarks

Extended synchronous variant of OpenChannel. Returns once the broker has confirmed the channel is open, or after aTimeout.

Example

if sgcWSPClient_AMQP1.OpenChannelEx('ch1') then
  sgcWSPClient_AMQP1.DeclareQueue('ch1', 'orders');

Back to Methods