ladderlore
လမ်းညွှန် တောင်းဆိုရန်
  • S3 သို့မဟုတ် IAM လို service အမည်ကို ရိုက်ထည့်ပါ။

Service · Application Integration · CLF-C02 အပေါ် ဆက်လေ့လာရန်

Amazon Simple Queue Service (Amazon SQS)

The settings that decide behavior: visibility timeout, long polling, delay, retention, DLQs, and scaling on queue depth.

ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။

Cloud Practitioner မှ သင်သိပြီးသားများ

  • A queue holds messages until a consumer processes and deletes them. Consumers pull.
  • It decouples and buffers: peaks wait in the queue, and messages survive a consumer failure.
  • Standard queues give the most throughput. FIFO queues keep order and avoid duplicates.
  • A dead-letter queue collects messages that keep failing.
Cloud Practitioner သင်ခန်းစာကို ဖတ်ရန်
Producer
SQS
Consumer
Dead-letter queue
  1. 1The producer sends a message. It waits in the queue for up to 14 days.
  2. 2A consumer receives it, and the message is hidden for the visibility timeout. The consumer deletes it when done. If it does not, the message reappears.
  3. 3After too many failed receives, the message moves to the dead-letter queue.
The life of a message, with a visibility timeout and a dead-letter queue.

အဆင့်ဆင့်

  1. 1The producer sends a message. It waits in the queue for up to 14 days.
  2. 2A consumer receives it, and the message is hidden for the visibility timeout. The consumer deletes it when done. If it does not, the message reappears.
  3. 3After too many failed receives, the message moves to the dead-letter queue.
  • Throughput

    Standard
    Nearly unlimited
    FIFO
    Limited, high-throughput mode raises it
  • Order

    Standard
    Best effort
    FIFO
    Kept within a message group
  • Duplicates

    Standard
    Possible
    FIFO
    Removed for 5 minutes
  • Queue name

    Standard
    Any
    FIFO
    Ends in .fifo
  • Use for

    Standard
    Most workloads
    FIFO
    Order matters, no duplicates
Standard is the default. Choose FIFO only when order or duplicates matter.

1 / 2

  • Throughput

    Standard
    Nearly unlimited
    FIFO
    Limited, high-throughput mode raises it
  • Order

    Standard
    Best effort
    FIFO
    Kept within a message group
  • Duplicates

    Standard
    Possible
    FIFO
    Removed for 5 minutes

2 / 2

  • Queue name

    Standard
    Any
    FIFO
    Ends in .fifo
  • Use for

    Standard
    Most workloads
    FIFO
    Order matters, no duplicates
Standard is the default. Choose FIFO only when order or duplicates matter.

ဘာလဲ

When a consumer receives a message, the message stays in the queue but is hidden for the visibility timeout (30 seconds by default, up to 12 hours). If the consumer deletes the message in time, it is gone. If not, it reappears and another consumer gets it. Set the timeout longer than the processing time. This is also why a standard queue can deliver a message twice, and why consumers must be idempotent.

ဘာလဲ

Short polling returns at once, often empty. Long polling waits up to 20 seconds for a message, which cuts empty responses and cost. A delay queue hides new messages for up to 15 minutes. Retention is 4 days by default and up to 14 days. A message can be up to 1 MiB (older guides say 256 KB). After a set number of failed receives (maxReceiveCount), a message moves to a dead-letter queue. Keep the DLQ retention longer than the source queue, and use redrive to send messages back after you fix the bug.

ဘာလဲ

Standard queues have nearly unlimited throughput. FIFO queues keep order within a message group ID and drop duplicates sent within 5 minutes. A FIFO queue handles 300 calls per second per action, 3,000 messages per second with batching, and more in high-throughput mode. To scale consumers, use an Auto Scaling group on the backlog per instance, not on CPU.

မှတ်ထားရန်

  • Visibility timeout: 30 seconds by default, up to 12 hours. Set it above the processing time.
  • Long polling (up to 20 seconds) cuts empty receives and cost.
  • Delay queue: up to 15 minutes. Retention: 4 days by default, up to 14 days. Message size: up to 1 MiB.
  • DLQ: used after maxReceiveCount failures. Redrive moves messages back.

မှတ်ထားရန်

  • Standard: at-least-once, best-effort order. FIFO: exactly-once processing, order per message group.
  • Scale consumers on backlog per instance.

စာမေးပွဲမှာ

  • “Two workers process the same message” points to a visibility timeout shorter than the processing time.
  • “Failed messages must be kept for analysis” points to a dead-letter queue.
  • “Scale worker instances with the number of waiting jobs” points to an Auto Scaling policy on queue depth per instance.
  • “Process orders in order, per customer” points to a FIFO queue with the customer as message group ID.