delete_message_batch ( $queue_url, $delete_message_batch_request_entry, $opt )

This is a batch version of DeleteMessage. It takes multiple receipt handles and deletes each one of the messages. The result of the delete operation on each message is reported individually in the response.

Access

public

Parameters

Parameter

Type

Required

Description

$queue_url

string

Required

The URL of the SQS queue to take action on.

$delete_message_batch_request_entry

array

Required

A list of receipt handles for the messages to be deleted.

  • x - array - Optional - This represents a simple array index.
    • Id - string - Required - An identifier for this particular receipt handle. This is used to communicate the result. Note that the Id s of a batch request need to be unique within the request.
    • ReceiptHandle - string - Required - A receipt handle.

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Source

Method defined in services/sqs.class.php | Toggle source view (12 lines) | View on GitHub

public function delete_message_batch($queue_url, $delete_message_batch_request_entry, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['QueueUrl'] = $queue_url;
    
    // Required list + map
    $opt = array_merge($opt, CFComplexType::map(array(
        'DeleteMessageBatchRequestEntry' => (is_array($delete_message_batch_request_entry) ? $delete_message_batch_request_entry : array($delete_message_batch_request_entry))
    )));

    return $this->authenticate('DeleteMessageBatch', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback