TsgcWSPClient_AMQPEvents › OnAMQPChannelOpen

OnAMQPChannelOpen Event

Fires when the server confirms that a channel has been opened (channel.open-ok).

Syntax

property OnAMQPChannelOpen: TsgcAMQPChannelOpenEvent;
// TsgcAMQPChannelOpenEvent = procedure(Sender: TObject; const aChannel: string) of object

Default Value

Remarks

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.

Example

procedure TForm1.oAMQPAMQPChannelOpen(Sender: TObject; const aChannel: string);
begin
  DoLog('#AMQP Channel opened: ' + aChannel);
  oAMQP.DeclareQueue(aChannel, 'queue_1');
end;

Back to Events