TsgcWSPClient_AMQPEvents › OnAMQPBasicCancelConsume

OnAMQPBasicCancelConsume Event

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

Syntax

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

Default Value

Remarks

Raised in response to CancelConsume. aConsumerTag identifies the consumer that has just been stopped. After this event no further OnAMQPBasicDeliver frames will arrive for that tag, but messages that were already delivered and not acknowledged remain pending until the channel is closed or the messages are recovered.

Example

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

Back to Events