Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Message Queue
  • Access management
  • Pricing policy
  • Terraform reference
    • Overview
      • ChangeMessageVisibility
      • ChangeMessageVisibilityBatch
      • DeleteMessage
      • DeleteMessageBatch
      • ReceiveMessage
      • SendMessage
      • SendMessageBatch
    • Common errors
  • Monitoring metrics
  • Public materials
  • FAQ

In this article:

  • Request
  • Request parameters
  • Response
  • Successful response fields
  • ChangeMessageVisibilityBatch errors
  • Sample request
  • Response example
  1. API reference
  2. Message
  3. ChangeMessageVisibilityBatch

ChangeMessageVisibilityBatch

Written by
Yandex Cloud
Updated at October 4, 2024
  • 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 visibility may fail, even if code 200 is returned in response to the ChangeMessageVisibilityBatch method call.

RequestRequest

Request parametersRequest 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 changing.

ResponseResponse

Successful response fieldsSuccessful 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 errorsChangeMessageVisibilityBatch 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 does not contain any entries.
400 InvalidBatchEntryId The ID of a batch entry is invalid.
400 TooManyEntriesInBatchRequest Too many entries in a batch.

Sample requestSample request

Action=ChangeMessageVisibilityBatch
&Version=2012-11-05
&QueueUrl=https://message-queue.api.cloud.yandex.net/b1g8ad42m6he********/dj6000000000********/sample-queue
&ChangeMessageVisibilityBatchRequestEntry.1.Id=8b6f1be7-effe631a-7b3cb***-*****
&ChangeMessageVisibilityBatchRequestEntry.1.ReceiptHandle=EAUg9bz********
&ChangeMessageVisibilityBatchRequestEntry.1.VisibilityTimeout=30
&ChangeMessageVisibilityBatchRequestEntry.2.Id=54fe7789-da6cfbfd-3664814a***-*****
&ChangeMessageVisibilityBatchRequestEntry.2.ReceiptHandle=EAEgrqv********
&ChangeMessageVisibilityBatchRequestEntry.2.VisibilityTimeout=30

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

Response exampleResponse example

<ChangeMessageVisibilityBatchResponse>
    <ChangeMessageVisibilityBatchResult>
        <ChangeMessageVisibilityBatchResultEntry>
            <Id>8b6f1be7-effe631a-7b3cbef1***-*****</Id>
        </ChangeMessageVisibilityBatchResultEntry>
        <ChangeMessageVisibilityBatchResultEntry>
            <Id>54fe7789-da6cfbfd-3664814a***-*****</Id>
        </ChangeMessageVisibilityBatchResultEntry>
    </ChangeMessageVisibilityBatchResult>
    <ResponseMetadata>
        <RequestId>4e249f0e-74ac41aa-aa8c6354-12fd717f-a9761e7b848e70720ec61d81********</RequestId>
    </ResponseMetadata>
</ChangeMessageVisibilityBatchResponse>

Was the article helpful?

Previous
ChangeMessageVisibility
Next
DeleteMessage
© 2025 Direct Cursus Technology L.L.C.