change_message_visibility_batch ( $queue_url, $change_message_visibility_batch_request_entry, $opt )

This is a batch version of ChangeMessageVisibility. It takes multiple receipt handles and performs the operation on each of the them. The result of the 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.

$change_message_visibility_batch_request_entry

array

Required

A list of receipt handles of the messages for which the visibility timeout must be changed.

  • 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.
    • VisibilityTimeout - integer - Optional - The new value (in seconds) for the message’s visibility timeout.

$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 change_message_visibility_batch($queue_url, $change_message_visibility_batch_request_entry, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['QueueUrl'] = $queue_url;
    
    // Required list + map
    $opt = array_merge($opt, CFComplexType::map(array(
        'ChangeMessageVisibilityBatchRequestEntry' => (is_array($change_message_visibility_batch_request_entry) ? $change_message_visibility_batch_request_entry : array($change_message_visibility_batch_request_entry))
    )));

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback