TsgcWSPClient_AMQPEvents › OnAMQPBasicGetEmpty

OnAMQPBasicGetEmpty Event

Fires when a synchronous basic.get finds the queue empty (basic.get-empty).

Syntax

property OnAMQPBasicGetEmpty: TsgcAMQPBasicGetEmptyEvent;
// TsgcAMQPBasicGetEmptyEvent = procedure(Sender: TObject; const aChannel: string) of object

Default Value

Remarks

Raised in response to a GetMessage pull request when there is no message available to deliver. It replaces OnAMQPBasicGetOk for that particular request. Use this event to back off polling or to switch to a push-based consumer via Consume.

Example

procedure TForm1.oAMQPAMQPBasicGetEmpty(Sender: TObject; const aChannel: string);
begin
  DoLog('#AMQP GetEmpty on ' + aChannel);
end;

Back to Events