AWS.SQS.ISQSQueuePoller.ChangeMessageVisibilityTimeout

Changes the message visibility timeout for a given message.

procedure ChangeMessageVisibilityTimeout(const AMessage: ISQSMessage; const ATimeout: Integer);
__fastcall ChangeMessageVisibilityTimeout(const ISQSMessage AMessage, const int ATimeout);

File: AWS.SQS.pas 

Namespace: AWS.SQS 

Module: Appercept AWS SDK for Delphi 

Parameters
Description
const AMessage: ISQSMessage
Specify the message.
const ATimeout: Integer
New timeout value in seconds. Valid values range from 0 to 43200 (12 hours).

This should be called within a Poll procedure block.

var QueueUrl := 'https://...'; var Poller = TSQSQueuePoller.Create(QueueUrl) as ISQSQueuePoller; Poller.Poll( procedure(const AMessages: TSQSMessages) begin for var LMessage in AMessages do begin // If you need more time to process the message, // change it's visibility timeout. Poller.ChangeMessageVisibilityTimeout(LMessage, 900); end; end );
Copyright © 2019-2021 Appercept Ltd. All rights reserved.