SQS - Message Visibility Timeout/Long Polling/FIFO Flashcards

1
Q

What is the message visibility timeout in SQS?

A

The message visibility timeout is the period during which a message, once polled by a consumer, is invisible to other consumers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the default visibility timeout in SQS?

A

30 seconds.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What happens if a message is not processed within the visibility timeout?

A

The message becomes visible again in the queue and can be reprocessed by the same or another consumer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why is the visibility timeout important?

A

It prevents multiple consumers from processing the same message simultaneously and ensures orderly message processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the risk of setting the visibility timeout too high?

A

If a consumer crashes, the message remains invisible for an extended period, delaying its reprocessing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the risk of setting the visibility timeout too low?

A

If the consumer cannot process the message in time, the message becomes visible again, potentially leading to duplicate processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the maximum visibility timeout you can configure in SQS?

A

12 hours.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is long polling in Amazon SQS?

A

Long polling allows a consumer to wait for messages to arrive in the queue, reducing the number of API calls and latency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the maximum duration for long polling?

A

20 seconds.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the benefits of long polling?

A

Fewer API calls: Reduces the frequency of polling requests.
Lower latency: Messages are sent to consumers as soon as they arrive in the queue.
Cost savings: Fewer API calls result in reduced costs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does FIFO stand for in Amazon SQS?

A

First In, First Out. It ensures that messages are processed in the exact order they are sent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When should you use an SQS FIFO queue?

A

When message ordering is critical.
When exactly-once processing is required.
When your application can work within the throughput constraints of FIFO queues.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly