Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Message Queue
  • Getting started
    • Quick start
    • Supported tools
    • Code samples
      • Node.js
      • PHP
      • JMS
      • Laravel
      • Terraform
  • Step-by-step instructions
    • Overview
    • Creating a new message queue
    • Sending messages
    • Receiving and deleting messages
    • Deleting a message queue
  • Concepts
    • Overview
    • Message queues
    • Messages
    • Deduplication
    • Visibility timeout
    • Long Polling
    • Dead Letter Queue
    • Delay queues
    • Quotas and limits
  • Access management
  • Pricing policy
  • Yandex Message Queue API
    • Overview
    • Queue
      • CreateQueue
      • DeleteQueue
      • GetQueueAttributes
      • GetQueueUrl
      • ListQueues
      • PurgeQueue
      • SetQueueAttributes
    • Message
      • ChangeMessageVisibility
      • ChangeMessageVisibilityBatch
      • DeleteMessage
      • DeleteMessageBatch
      • ReceiveMessage
      • SendMessage
      • SendMessageBatch
    • Data types
      • BatchResultErrorEntry
      • ChangeMessageVisibilityBatchRequestEntry
      • ChangeMessageVisibilityBatchResultEntry
      • DeleteMessageBatchRequestEntry
      • DeleteMessageBatchResultEntry
      • Message
      • MessageAttributeValue
      • SendMessageBatchRequestEntry
      • SendMessageBatchResultEntry
    • Common errors
  • Questions and answers
  1. Yandex Message Queue API
  2. Message
  3. ChangeMessageVisibilityBatch

ChangeMessageVisibilityBatch

  • Request
    • Request parameters
  • Response
    • Successful response fields
    • ChangeMessageVisibilityBatch errors
  • Sample request
  • Response example

Method for setting the visibility timeout for multiple messages in the specified queue. You can send up to 10 ChangeMessageVisibility requests with each ChangeMessageVisibilityBatch action.

The result of changing each message's visibility timeout is reported individually in the response. Check all results, because the action to change the message's visibility might fail, even if code 200 is returned in response to the ChangeMessageVisibilityBatch method call.

Request

Request parameters

Parameter Type Required parameter Description
QueueUrl string Yes URL of the queue where the message is placed. Case-sensitive.
ChangeMessageVisibilityBatchRequestEntry.N array Yes The ChangeMessageVisibilityBatchRequestEntry array that contains the ReceiptHandle parameters of messages whose visibility timeout needs to be changed.

Response

Successful response fields

Field Type Description
BatchResultErrorEntry.N array The BatchResultErrorEntry array with request result error descriptions.
ChangeMessageVisibilityBatchResultEntry.N array ChangeMessageVisibilityBatchResultEntry array with the IDs of messages with a successfully changed timeout.

ChangeMessageVisibilityBatch errors

For a list of errors common for all methods, see Common errors.

HTTP code Error ID Description
400 BatchEntryIdsNotDistinct Two or more batch entries in the request have the same ID.
400 EmptyBatchRequest The batch request doesn't contain any entries.
400 InvalidBatchEntryId The ID of a batch entry is invalid.
400 TooManyEntriesInBatchRequest Too many entries in a batch.

Sample request

Action=ChangeMessageVisibilityBatch
&Version=2012-11-05
&QueueUrl=https://message-queue.api.cloud.yandex.net/b1g8ad42m6he1ooql78r/dj600000000000le07ol/sample-queue
&ChangeMessageVisibilityBatchRequestEntry.1.Id=8b6f1be7-effe631a-7b3cbef1-158bf58
&ChangeMessageVisibilityBatchRequestEntry.1.ReceiptHandle=EAUg9bzYh4gtKAA
&ChangeMessageVisibilityBatchRequestEntry.1.VisibilityTimeout=30
&ChangeMessageVisibilityBatchRequestEntry.2.Id=54fe7789-da6cfbfd-3664814a-158c30e
&ChangeMessageVisibilityBatchRequestEntry.2.ReceiptHandle=EAEgrqvYh4gtKAE
&ChangeMessageVisibilityBatchRequestEntry.2.VisibilityTimeout=30

For more information about forming requests, see General API request format.

Response example

<ChangeMessageVisibilityBatchResponse>
    <ChangeMessageVisibilityBatchResult>
        <ChangeMessageVisibilityBatchResultEntry>
            <Id>8b6f1be7-effe631a-7b3cbef1-158bf58</Id>
        </ChangeMessageVisibilityBatchResultEntry>
        <ChangeMessageVisibilityBatchResultEntry>
            <Id>54fe7789-da6cfbfd-3664814a-158c30e</Id>
        </ChangeMessageVisibilityBatchResultEntry>
    </ChangeMessageVisibilityBatchResult>
    <ResponseMetadata>
        <RequestId>4e249f0e-74ac41aa-aa8c6354-12fd717f-a9761e7b848e70720ec61d8172871228</RequestId>
    </ResponseMetadata>
</ChangeMessageVisibilityBatchResponse>
In this article:
  • Request
  • Request parameters
  • Response
  • Successful response fields
  • ChangeMessageVisibilityBatch errors
  • Sample request
  • Response example
Language / Region
Careers
Privacy policy
Terms of use
Brandbook
© 2021 Yandex.Cloud LLC