The DeleteMessage
action unconditionally removes the specified message from the
specified queue. Even if the message is locked by another reader due to the visibility timeout
setting, it is still deleted from the queue.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The URL of the SQS queue to take action on. |
|
|
Required |
The receipt handle associated with the message to delete. |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Delete a message from a queue.
// Delete a message we've read $sqs = new AmazonSQS(); $response = $sqs->delete_message('example-queue', '0NNAq8PwvXvg8EfAYG9sSmwKTZeixZgZNE6PbodG8td0DJ3gVOmjI2Gh/oFnb0='); // Success? var_dump($response->isOK());Result:
bool(true)
Related Methods
Source
Method defined in services/sqs.class.php | Toggle source view (8 lines) | View on GitHub