TsgcWSPClient_AMQP1Events › OnAMQPSessionOpen

OnAMQPSessionOpen Event

Fires when the peer answers a session Begin frame, confirming the session has been opened on its channel.

Syntax

property OnAMQPSessionOpen: TsgcAMQP1SessionOpenEvent;
// TsgcAMQP1SessionOpenEvent = procedure(Sender: TObject; const aSession: TsgcAMQP1Session; const aBegin: TsgcAMQP1FrameBegin) of object

Default Value

Remarks

Raised once the peer has returned its own begin performative in reply to the client's Begin. aSession is the session object created by CreateSession; aBegin carries the remote parameters: RemoteChannel echoed back, NextOutgoingId, IncomingWindow, OutgoingWindow, HandleMax (upper bound on link handles on this session) and any OfferedCapabilities / Properties. This is the right place to attach the first links via CreateSenderLink / CreateReceiverLink.

Example

procedure TForm1.oAMQP1AMQPSessionOpen(Sender: TObject;
  const aSession: TsgcAMQP1Session; const aBegin: TsgcAMQP1FrameBegin);
begin
  DoLog('#AMQP1 session opened: ' + aSession.Name);
  oAMQP1.CreateReceiverLink(aSession.Name, 'receiver_1', 'queue-orders');
end;

Back to Events