TsgcWSPClient_AMQPMethods › CloseChannel

CloseChannel Method

Closes an AMQP channel (channel.close).

Syntax

procedure CloseChannel(const aChannel: string; aReplyCode: Word = 0; const aReplyText: string = ''; aFailClassId: TsgcAMQPClass = amqpClassNone; aFailMethodId: TsgcAMQPMethod = amqpMethodNone);

Parameters

NameTypeDescription
aChannelconst stringName of the open AMQP channel on which the operation is issued.
aReplyCodeWordAMQP reply-code returned to the broker (use 200 for a clean close).
aReplyTextconst stringHuman-readable reply-text returned to the broker.
aFailClassIdTsgcAMQPClassAMQP class-id of the offending method when closing after an error (amqpClassNone for a normal close).
aFailMethodIdTsgcAMQPMethodAMQP method-id of the offending method when closing after an error (amqpMethodNone for a normal close).

Remarks

Sends channel.close to the broker with the supplied reply code/text and optional offending class/method identifiers. The channel can no longer be used after this call; open a new one if needed.

Example

sgcWSPClient_AMQP1.CloseChannel('ch1');

Back to Methods