Data.Cloud.AzureAPI.TAzureQueueService.GetMessages
Delphi
function GetMessages(const QueueName: string; NumOfMessages: Integer = 0; VisibilityTimeout: Integer = 0; ResponseInfo: TCloudResponseInfo = nil): TList<TCloudQueueMessage>;
C++
System::Generics::Collections::TList__1<Data::Cloud::Cloudapi::TCloudQueueMessage*>* __fastcall GetMessages(const System::UnicodeString QueueName, int NumOfMessages = 0x0, int VisibilityTimeout = 0x0, Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0));
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| function | public | Data.Cloud.AzureAPI.pas Data.Cloud.AzureAPI.hpp |
Data.Cloud.AzureAPI | TAzureQueueService |
Description
Returns messages from the given queue.
Use GetMessages to get messages from the given queue.
The following table shows the significance of the parameters:
| Parameter | Description |
|---|---|
|
QueueName |
The name of the queue to get the messages for. |
|
NumOfMessages |
The maximum number of messages to return. |
|
VisibilityTimeout |
How long the messages should be reserved for. |
|
ResponseInfo |
The optional class for storing response info into. |
If NumOfMessages is not set, then the server default of 1 is used. The maximum allowed value is 32.
If VisibilityTimeout is not set, the server default (30 seconds) is used. The maximum allowed value is 2 hours.
Note that messages returned by this call will have their Data.Cloud.CloudAPI.TCloudQueueMessage.PopReceipt specified, which is a token unique to the message during the VisibilityTimeout that can be used to delete the message. During VisibilityTimeout, the messages are hidden from any further message querying.
The method returns the list of messages, with their pop receipts populated.