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
    • Overview
    • Message queues
    • Messages
    • Deduplication
    • Visibility timeout
    • Long Polling
    • What is Dead Letter Queue (DLQ)?
    • Delay queues
    • Quotas and limits
    • Queue labels
    • Comparison with Yandex Data Streams
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Public materials
  • FAQ
  1. Concepts
  2. Messages

Messages

Written by
Yandex Cloud
Updated at March 7, 2025

Messages are sent through queues and can contain plain text in the body. Messages are received by consumers that delete them from the queue after processing.

A message can be in one of the following three states:

  • A message is sent to a queue by the producer. If a message is sent to a queue but has not yet been accepted by a consumer, it is assumed to be in the queue.
  • The message is received by the consumer. If the message is received by the consumer but has not yet been deleted from the queue, it is assumed that it is being processed.
  • The message is deleted from the queue.

Standard queues can process up to 120,000 messages at once. To avoid exceeding the limit, messages should be deleted from the queue without considerable delay. FIFO queues can process up to 20,000 messages at once.

A message contains several fields:

  1. Message body.
  2. A set of message attributes indicating its sending time, the number of message receipts, and the time of its first receipt by the consumer.
  3. Message receipt ID. Each time a message is received from the queue, an ID is generated to indicate that the message has been received. This ID is used when deleting the received message from the queue or changing its visibility timeout. A message must be received by a consumer before being deleted. If a message is received more than once, it will be assigned a new receipt ID each time. Use the most recent ID to delete the message or change its visibility timeout.
  4. Hash sum of the message body.
  5. Message ID. Each message is assigned a unique ID that is returned in response to the SendMessage method call. This ID can be used to access messages; to delete messages from the queue, use the message receipt ID: ReceiptHandle.

View of a message with plain text and without any additional parameters:

{
            "Body": "Sample message",
            "Attributes": {
                "ApproximateFirstReceiveTimestamp": "1544718635323",
                "ApproximateReceiveCount": "1",
                "SentTimestamp": "1544718633138"
            },
            "ReceiptHandle": "EAsgu6Kfw_osKAE",
            "MD5OfBody": "5b792970792ac60da66329aa********",
            "MessageId": "fa6bcfb7-6f121e1d-fb3b33aa***-*****"
}

Use casesUse cases

  • Autoscaling an instance group to process messages from a queue in Message Queue
  • Converting a video to a GIF in Python
  • Creating an interactive serverless application using WebSocket
  • Creating triggers that invoke Cloud Functions functions to stop a VM and send Telegram notifications

Was the article helpful?

Previous
Message queues
Next
Deduplication
© 2025 Direct Cursus Technology L.L.C.