TsgcWSPClient_AMQPEvents › OnAMQPBasicConsume

OnAMQPBasicConsume Event

Fires when the server confirms that a consumer has been registered (basic.consume-ok).

Syntax

property OnAMQPBasicConsume: TsgcAMQPBasicConsumeEvent;
// TsgcAMQPBasicConsumeEvent = procedure(Sender: TObject; const aChannel, aConsumerTag: string) of object

Default Value

Remarks

Raised in response to Consume. aConsumerTag is the identifier assigned to the consumer: use it to correlate subsequent OnAMQPBasicDeliver events or to cancel the subscription via CancelConsume. If the tag was not provided by the caller, the broker generates one and returns it here.

Example

procedure TForm1.oAMQPAMQPBasicConsume(Sender: TObject;
  const aChannel, aConsumerTag: string);
begin
  DoLog(Format('#AMQP Consumer started: %s on %s', [aConsumerTag, aChannel]));
end;

Back to Events