Data.Cloud.AzureAPI.TAzureQueueService.DeleteMessage
Delphi
function DeleteMessage(const QueueName: string; const MessageId: string; const PopReceipt: string; ResponseInfo: TCloudResponseInfo = nil): Boolean; overload;
function DeleteMessage(const QueueName: string; const QueueMessage: TCloudQueueMessage; GetPopReceiptIfNeeded: Boolean = True; ResponseInfo: TCloudResponseInfo = nil): Boolean; overload;
C++
bool __fastcall DeleteMessage(const System::UnicodeString QueueName, const System::UnicodeString MessageId, const System::UnicodeString PopReceipt, Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0))/* overload */;
bool __fastcall DeleteMessage(const System::UnicodeString QueueName, Data::Cloud::Cloudapi::TCloudQueueMessage* const QueueMessage, bool GetPopReceiptIfNeeded = true, Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0))/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Data.Cloud.AzureAPI.pas Data.Cloud.AzureAPI.hpp |
Data.Cloud.AzureAPI | TAzureQueueService |
Description
Deletes the given message from the specified queue.
There are two DeleteMessage overloaded methods.
The following table shows the significance of the parameters for both overloaded methods:
Parameter | Description |
---|---|
QueueName |
The name of the queue to delete a message from. |
MessageId |
The unique ID of the message to delete. |
PopReceipt |
The pop receipt required for deleting the message. |
QueueMessage |
The message to delete. |
GetPopReceiptIfNeeded |
Set to True (the default) to try getting a pop receipt for the message if it does not have one already. |
ResponseInfo |
The optional class for storing response info into. |
If GetPopReceiptIfNeeded
is set to True (the default), then if the message object has an empty string set as its pop receipt, then a pop receipt is acquired by first calling GetMessages with the default values for number of messages and visibility timeout. If the message requesting deletion is not on the top of the queue, the deletion will fail.
The method returns True if the deletion succeeds, and False otherwise.