TsgcWSPClient_AMQP1Events › OnAMQPSessionClose

OnAMQPSessionClose Event

Fires when the peer answers with an End frame, terminating an AMQP 1.0 session.

Syntax

property OnAMQPSessionClose: TsgcAMQP1SessionCloseEvent;
// TsgcAMQP1SessionCloseEvent = procedure(Sender: TObject; const aSession: TsgcAMQP1Session; const aEnd: TsgcAMQP1FrameEnd) of object

Default Value

Remarks

Raised when the peer returns an end performative, either mirroring a local CloseSession call or asynchronously ending the session itself. aSession identifies which local session is going down; aEnd.Error is nil on a clean end or carries the AMQP error (for example amqp:session:window-violation, amqp:session:errant-link) that caused the broker to end it. After this event the session's channel number and link handles are freed and any sender/receiver links attached to the session are implicitly detached.

Example

procedure TForm1.oAMQP1AMQPSessionClose(Sender: TObject;
  const aSession: TsgcAMQP1Session; const aEnd: TsgcAMQP1FrameEnd);
begin
  DoLog('#AMQP1 session closed: ' + aSession.Name);
end;

Back to Events