Service · Application Integration
Amazon Simple Queue Service (Amazon SQS)
A fully managed message queue, so the parts of an application can work at their own pace without losing messages.
ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။
- 1The shop puts each new order into the queue as a message, then answers the customer straight away.
- 2When a worker is free, it asks the queue for the next message. You can add workers when the queue grows.
- 3When the order is handled, the worker deletes the message. A message that keeps failing moves to a dead-letter queue.
အဆင့်ဆင့်
- 1The shop puts each new order into the queue as a message, then answers the customer straight away.
- 2When a worker is free, it asks the queue for the next message. You can add workers when the queue grows.
- 3When the order is handled, the worker deletes the message. A message that keeps failing moves to a dead-letter queue.
Order of messages
- Standard queue
- Best effort. Messages can arrive out of order.
- FIFO queue
- First in, first out: the exact order they were sent
Duplicates
- Standard queue
- At-least-once delivery: a message can arrive twice
- FIFO queue
- Exactly-once processing: no duplicates
Throughput
- Standard queue
- Nearly unlimited
- FIFO queue
- High, but lower than standard
Choose it when
- Standard queue
- Speed matters most, such as resizing uploaded photos
- FIFO queue
- Order matters, such as price changes that must apply in sequence
| နှိုင်းယှဉ်ချက် | Standard queue | FIFO queue |
|---|---|---|
| Order of messages | Best effort. Messages can arrive out of order. | First in, first out: the exact order they were sent |
| Duplicates | At-least-once delivery: a message can arrive twice | Exactly-once processing: no duplicates |
| Throughput | Nearly unlimited | High, but lower than standard |
| Choose it when | Speed matters most, such as resizing uploaded photos | Order matters, such as price changes that must apply in sequence |
1 / 2
Order of messages
- Standard queue
- Best effort. Messages can arrive out of order.
- FIFO queue
- First in, first out: the exact order they were sent
Duplicates
- Standard queue
- At-least-once delivery: a message can arrive twice
- FIFO queue
- Exactly-once processing: no duplicates
| နှိုင်းယှဉ်ချက် | Standard queue | FIFO queue |
|---|---|---|
| Order of messages | Best effort. Messages can arrive out of order. | First in, first out: the exact order they were sent |
| Duplicates | At-least-once delivery: a message can arrive twice | Exactly-once processing: no duplicates |
2 / 2
Throughput
- Standard queue
- Nearly unlimited
- FIFO queue
- High, but lower than standard
Choose it when
- Standard queue
- Speed matters most, such as resizing uploaded photos
- FIFO queue
- Order matters, such as price changes that must apply in sequence
| နှိုင်းယှဉ်ချက် | Standard queue | FIFO queue |
|---|---|---|
| Throughput | Nearly unlimited | High, but lower than standard |
| Choose it when | Speed matters most, such as resizing uploaded photos | Order matters, such as price changes that must apply in sequence |
ဘာလဲ
Amazon Simple Queue Service (Amazon SQS) is a fully managed message queue. One part of an application, the producer, puts messages into a queue. Another part, the consumer, takes them out when it is ready. The two parts no longer have to work at the same speed, or even at the same time. This is called decoupling.
ဘာလဲ
Messages wait in the queue until a consumer processes and deletes them. SQS keeps copies of each message in more than one Availability Zone, so a message is not lost if a server fails. When traffic jumps, the queue grows, and you can add more consumers to catch up. A message that keeps failing can move to a dead-letter queue, where someone can look at it later.
There are two types of queue. Standard queues give nearly unlimited throughput, but a message can arrive more than once or out of order. FIFO (first-in, first-out) queues keep the exact order and process each message only once.
မှတ်ထားရန်
- Pull model: consumers ask the queue for messages when they are ready.
- Each message is processed by one consumer, then deleted from the queue.
- Decoupling: if a consumer fails, its messages wait in the queue instead of being lost.
- Buffering: a queue absorbs sudden peaks, such as orders during a flash sale.
မှတ်ထားရန်
- FIFO queues keep the order and avoid duplicates. Standard queues give the most throughput.
- Fully managed and serverless: no servers to run, and you pay per request.
စာမေးပွဲမှာ
- “Decouple application components” or “make sure no orders are lost if the processing servers fail” points to Amazon SQS.
- “Process messages in the exact order they were sent, with no duplicates” points to an SQS FIFO queue.
- “Send one message to many subscribers at once” points to Amazon SNS, not SQS.
ဒါတွေနဲ့ မရောပါနဲ့
Amazon Simple Notification Service (Amazon SNS)Publish a message once, and SNS pushes it to every subscriber: queues, functions, apps, phones and email.
Amazon EventBridgeA serverless event bus that routes events from AWS services, your apps and SaaS apps to the targets that need them.
Amazon KinesisCollects and processes streaming data, such as clicks, logs and video, in real time.