TsgcWSPClient_AMQP › Methods › CloseChannelEx
Closes an AMQP channel synchronously and returns True when the broker acknowledged the close.
function CloseChannelEx(const aChannel: string; aReplyCode: Word = 0; const aReplyText: string = ''; aFailClassId: TsgcAMQPClass = amqpClassNone; aFailMethodId: TsgcAMQPMethod = amqpMethodNone; aTimeout: Integer = CS_AMQP_DEFAULT_TIMEOUT): Boolean;
| 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). |
aTimeout | Integer | Maximum time in milliseconds to wait for the broker confirmation before returning False. |
True when the broker acknowledged the channel close within aTimeout, False otherwise. (Boolean)
Extended synchronous variant of CloseChannel. Waits for channel.close-ok before returning or until aTimeout elapses.
sgcWSPClient_AMQP1.CloseChannelEx('ch1', 200, 'OK');