TsgcWSPClient_AMQP › Events › OnAMQPChannelOpen
Fires when the server confirms that a channel has been opened (channel.open-ok).
property OnAMQPChannelOpen: TsgcAMQPChannelOpenEvent;
// TsgcAMQPChannelOpenEvent = procedure(Sender: TObject; const aChannel: string) of object
—
Raised after a successful call to OpenChannel. aChannel is the logical channel name passed to OpenChannel; the client maps it to the numeric AMQP channel id internally. Once this event fires the channel is ready and you can declare exchanges/queues, bind them, start consumers or publish messages on it.
procedure TForm1.oAMQPAMQPChannelOpen(Sender: TObject; const aChannel: string);
begin
DoLog('#AMQP Channel opened: ' + aChannel);
oAMQP.DeclareQueue(aChannel, 'queue_1');
end;