TsgcWSPClient_AMQP1Events › OnAMQPLinkOpen

OnAMQPLinkOpen Event

Fires when the peer answers with an Attach frame, confirming that a sender or receiver link is fully established.

Syntax

property OnAMQPLinkOpen: TsgcAMQP1LinkOpenEvent;
// TsgcAMQP1LinkOpenEvent = procedure(Sender: TObject; const aSession: TsgcAMQP1Session; const aLink: TsgcAMQP1Link; const aAttach: TsgcAMQP1FrameAttach) of object

Default Value

Remarks

Raised once the peer mirrors an attach performative for a link previously created with CreateSenderLink or CreateReceiverLink. Inspect aLink.Role (false = sender, true = receiver), aAttach.Handle, aAttach.Source / aAttach.Target, the negotiated SndSettleMode / RcvSettleMode, InitialDeliveryCount, MaxMessageSize, OfferedCapabilities and Properties. A sender link is ready to emit messages after this event; a receiver link will begin to receive Transfer frames (surfaced via OnAMQPMessage) as soon as link credit is granted.

Example

procedure TForm1.oAMQP1AMQPLinkOpen(Sender: TObject;
  const aSession: TsgcAMQP1Session; const aLink: TsgcAMQP1Link;
  const aAttach: TsgcAMQP1FrameAttach);
begin
  DoLog(Format('#AMQP1 link attached: %s (role=%d)',
    [aLink.Name, Ord(aLink.Role)]));
end;

Back to Events