From RAD Studio API Documentation
Jump to: navigation, search


function GetMessages(const QueueURL: string;  NumOfMessages: Integer = 0; VisibilityTimeout: Integer = -1; ResponseInfo: TCloudResponseInfo = nil): TList<TCloudQueueMessage>; deprecated;


System::Generics::Collections::TList__1<Data::Cloud::Cloudapi::TCloudQueueMessage*>* __fastcall GetMessages _DEPRECATED_ATTRIBUTE0 (const System::UnicodeString QueueURL, int NumOfMessages = 0x0, int VisibilityTimeout = 0xffffffff, Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0));


Type Visibility Source Unit Parent
function public
Data.Cloud.AmazonAPI TAmazonQueueService


Warning: GetMessages is deprecated. Please use ReceiveMessage.

Retrieves a list of messages from a queue.

This method accepts the following parameters:

  • QueueURL: The URL of the queue.
  • NumOfMessages: Optional. The maximum number of messages that you want to retrieve. If you do not specify NumOfMessages, the method returns 1 message. The maximum allowed value for NumOfMessages is 10.
  • VisibilityTimeout: Optional. The time in seconds that the messages are hidden from other requests. If you do not set VisibilityTimeout, the default value of the corresponding queue applies (see SetQueueProperty). The maximum value is 12 hours (43200 seconds).
  • ResponseInfo: Optional. The class that stores the response information.

This method returns a list of messages. Each message has the value PopReceipt specified, which you can use to delete that message.

PeekMessages is similar to GetMessages. The main difference is that PeekMessages does not hide the messages from other requests. You can achieve the same result if you pass 0 as VisibilityTimeout parameter to GetMessages.

See Also