TSQSQueuePoller
Class in AWS.SQS
A utility class for long polling messages in a loop.
var QueueUrl := 'https://...'; var Poller = TSQSQueuePoller.Create(QueueUrl) as ISQSQueuePoller; Poller.Poll( procedure(const AMessages: TSQSMessages) begin // Do something with AMessages. end ); )
Messages are automatically deleted from the queue at the end of the given Poll procedure. Use SkipDelete property to change this behaviour.
Ancestors
Properties
AttributeNames
property AttributeNames: TList<string>
IdleTimeout
property IdleTimeout: TOptional<Integer>
MaxNumberOfMessages
property MaxNumberOfMessages: TOptional<Integer>
MessageAttributeNames
property MessageAttributeNames: TList<string>
OnBeforeRequest
property OnBeforeRequest: TSQSQueuePollerBeforeRequestHandler
SkipDelete
property SkipDelete: Boolean
VisibilityTimeout
property VisibilityTimeout: TOptional<Integer>
WaitTimeSeconds
property WaitTimeSeconds: TOptional<Integer>
Constructors
Create
constructor Create(const AQueueUrl: string; AClient: ISQSClient = nil);
Constructor for TSQSQueuePoller.
Parameters
| Name | Description |
|---|---|
AQueueUrl | Specify the URL of the queue to poll. Required. |
AClient | Optionally specify a pre-configured SQS client. |