TsgcWSPClient_AMQP › Events › OnAMQPDisconnect
Fires when the server or the client closes the AMQP connection (connection.close).
property OnAMQPDisconnect: TsgcAMQPDisconnectEvent;
// TsgcAMQPDisconnectEvent = procedure(Sender: TObject; const aClose: TsgcAMQPFramePayload_Method_ConnectionClose; aAck: Boolean) of object
—
Raised when a connection.close method is exchanged. aClose contains the reply code, reply text and (when relevant) the class/method id that caused the close, so you can diagnose protocol errors. aAck is True when the client acknowledged a close initiated by the server (connection.close-ok sent) and False when the client itself issued the close. After this event the underlying TCP/WebSocket connection will be terminated.
procedure TForm1.oAMQPAMQPDisconnect(Sender: TObject;
const aClose: TsgcAMQPFramePayload_Method_ConnectionClose; aAck: Boolean);
begin
DoLog(Format('#AMQP Disconnected: %d %s (ack=%s)',
[aClose.ReplyCode, aClose.ReplyText, BoolToStr(aAck, True)]));
end;