TsgcWSPClient_AMQP › Methods › CloseChannel
Closes an AMQP channel (channel.close).
procedure CloseChannel(const aChannel: string; aReplyCode: Word = 0; const aReplyText: string = ''; aFailClassId: TsgcAMQPClass = amqpClassNone; aFailMethodId: TsgcAMQPMethod = amqpMethodNone);
| Name | Type | Description |
|---|---|---|
aChannel | const string | Name of the open AMQP channel on which the operation is issued. |
aReplyCode | Word | AMQP reply-code returned to the broker (use 200 for a clean close). |
aReplyText | const string | Human-readable reply-text returned to the broker. |
aFailClassId | TsgcAMQPClass | AMQP class-id of the offending method when closing after an error (amqpClassNone for a normal close). |
aFailMethodId | TsgcAMQPMethod | AMQP method-id of the offending method when closing after an error (amqpMethodNone for a normal close). |
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.
sgcWSPClient_AMQP1.CloseChannel('ch1');