TsgcWSPClient_AMQP › Events › OnAMQPConnect
Fires after the AMQP connection handshake completes successfully (connection.open-ok).
property OnAMQPConnect: TsgcAMQPConnectEvent;
// TsgcAMQPConnectEvent = procedure(Sender: TObject) of object
—
Raised once the server has answered connection.open-ok, meaning the TCP/WebSocket link, virtual host and connection tuning have all been negotiated. From this point on you can safely call OpenChannel and any channel-level operation. This event is the right place to open your first channel, declare exchanges/queues or start consuming.
procedure TForm1.oAMQPAMQPConnect(Sender: TObject);
begin
DoLog('#AMQP Connected');
oAMQP.OpenChannel('channel_1');
end;