Optionally specify an OnBeforeRequest to receive a callback before each Poll request is started. The handler method is provided with polling statistics.
var QueueUrl := 'https://...';
var Poller := TSQSQueuePoller.Create(QueueUrl) asISQSQueuePoller;
Poller.OnBeforeRequest := procedure(const APoller: ISQSQueuePoller;
const AStats: TSQSQueuePollerStatistics)
beginif AStats.RequestCount = 0 then
Log(Format('Polling started at %s', [FormatDateTime('c', AStats.PollingStartedAt)]))
else
Log(Format('Polling iteration %d', [AStats.RequestCount]));
Log(Format('Messages received to date %d', [AStats.ReceivedMessageCount]));
end;