TsgcWSPClient_AMQPEvents › OnAMQPExchangeDeclare

OnAMQPExchangeDeclare Event

Fires when the server confirms that an exchange has been declared (exchange.declare-ok).

Syntax

property OnAMQPExchangeDeclare: TsgcAMQPExchangeDeclareEvent;
// TsgcAMQPExchangeDeclareEvent = procedure(Sender: TObject; const aChannel, aExchange: string) of object

Default Value

Remarks

Raised in response to a call to DeclareExchange. aChannel is the channel that carried the declare, aExchange is the exchange name that has been created or verified. Because exchanges are idempotent, receiving this event simply means the exchange now exists on the server with the type and flags that were requested. Use it to chain queue declarations and bindings once the exchange is guaranteed to be available.

Example

procedure TForm1.oAMQPAMQPExchangeDeclare(Sender: TObject;
  const aChannel, aExchange: string);
begin
  DoLog(Format('#AMQP Exchange declared: %s on %s', [aExchange, aChannel]));
end;

Back to Events