var QueueUrl := 'https://...';
var Poller := TSQSQueuePoller.Create(QueueUrl)
as ISQSQueuePoller;
Poller.OnBeforeRequest :=
procedure(
const APoller:
ISQSQueuePoller;
const AStats:
TSQSQueuePollerStatistics)
begin
if 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;