TsgcWSPClient_AMQPEvents › OnAMQPBasicQoS

OnAMQPBasicQoS Event

Fires when the server confirms that a QoS prefetch setting has been applied (basic.qos-ok).

Syntax

property OnAMQPBasicQoS: TsgcAMQPBasicQoSEvent;
// TsgcAMQPBasicQoSEvent = procedure(Sender: TObject; const aChannel: string; const aQoS: TsgcAMQPFramePayload_Method_BasicQoS) of object

Default Value

Remarks

Raised in response to a call to BasicQoS. aQoS reports the values that are now in effect on the channel: PrefetchSize (maximum total size in bytes of outstanding messages), PrefetchCount (maximum number of unacknowledged messages) and Global (True when the limit applies per-connection, False when per-consumer). Use this event to verify that the broker accepted the requested flow control before starting the consumer.

Example

procedure TForm1.oAMQPAMQPBasicQoS(Sender: TObject; const aChannel: string;
  const aQoS: TsgcAMQPFramePayload_Method_BasicQoS);
begin
  DoLog(Format('#AMQP QoS on %s: prefetch=%d size=%d global=%s',
    [aChannel, aQoS.PrefetchCount, aQoS.PrefetchSize,
     BoolToStr(aQoS.Global, True)]));
end;

Back to Events