TsgcWSPClient_AMQP › Methods › Close
Closes the AMQP connection. Overloaded: clean close with no arguments, or explicit close passing reply-code/text/class/method.
procedure Close(aReplyCode: Word; const aReplyText: string; aFailClassId: TsgcAMQPClass = amqpClassNone; aFailMethodId: TsgcAMQPMethod = amqpMethodNone);
| Name | Type | Description |
|---|---|---|
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 connection.close to the broker with the supplied reply code, reply text and optional offending class/method identifiers. Use this variant when the client has to report an error back to the broker.
sgcWSPClient_AMQP1.Close(320, 'connection forced', amqpClassNone, amqpMethodNone);
procedure Close;
Parameterless overload that performs a clean shutdown (reply-code 200, reply-text "OK"). This is the usual way of terminating an AMQP session.
sgcWSPClient_AMQP1.Close;