SQS Flashcards

1
Q

SQS was the first AWS service?

A

TRUE

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

What is the default Visibility Timeout?

A

30 seconds

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

What is the maximum Visibility TImeout?

A

12 hours

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

What is the maximum size of a SQS message?

A

256KB (text in any format, JSON, XML, plain text)

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

What are the two types of queues? How do they work?

A
  • Standard Queues (default)
  • nearly unlimited number of transactions per second
  • messages are delivered at least once
  • messages might be out of order
  • FIFO Queues
  • messages are delivered in order
  • messages are delivered exactly once
  • messages are available until a consumer processes and deletes it
  • limited to 300 transactions per second
  • support message groups that allow multiple ordered message groups within a single queue (messages within the same message group is processed one by one, in strict order relative to the message group, while messages that belongs to different message groups might be processed out of order)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How long can messages be kept in the queue?

A

1 minute to 14 days

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

What is the default retention period?

A

4 days

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

What is long polling?

A

Long polling doesn’t return a response until a message arrives in the queue or the timeout has been reached

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

What is SQS?

A

SQS is a distributed message queueing system. It allows you to decouple the components of an application so that they are independent.

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

What is short polling?

A

Short polling returns immediately even if there are no messages in the queue.

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

What API call can you use to extend the length of the visibility timeout for a specific message?

A

ChangeMessageVisibility

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

What is the minimum Visibility Timeout?

A

0 seconds

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

What is meant when one says that a message is ‘in flight’?

A

It has been received from an SQS queue by a consumer, but the message has not get been deleted.

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

What is the maximum number of ‘in flight’ messages for an SQS queue?

A

Approximately 120.000 for Standard Queues, 20.000 for FIFO queues.

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

What is the maximum long polling timeout?

A

20 seconds

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

In SQS, what is a Delay Queue?

A
  • It is used to postpone delivery of new messages to a queue for a number of seconds
  • Messages sent to the Delay Queue remain invisible to consumers for the duration of the delay period
  • Default delay is 0 seconds, maximum is 900 (15 min)
17
Q

What is the default delay of a Delay Queue? What is the maximum?

A

Default delay is 0 seconds, maximum is 900 (15 min)

18
Q

How does changing the Delay Queue settings affect a Standard and FIFO queue?

A
  • Standard queue: it doesn’t affect messages already in the queue, only new messages.
  • FIFO: it affects the delivery of messages already in the queue.
19
Q

When should a Delay Queue be used?

A
  • Might be needed in large distributed applications that need to introduce a delay in processing
  • E.g. adding a delay of a few seconds, to allow for updates to your sales and stock control database before sending a notification to a customer confirming a online transaction
20
Q

What is a large SQS messages?

A

A message with a size of over 256KB up to 2GB.

21
Q

How can you handle large SQS messages?

A
  • Use S3 to store them
  • Use Amazon SQS Extended Client Library for JAVA to manage the messages when they are in S3
  • AWS SDK for JAVA - provides an API for S3 bucket and object operations (allows you to get, put and delete objects from the S3 bucket)
22
Q

What does SQS Extended Client Library for JAVA allow you to do?

A
  • Specify whether all messages should be stored in S3, or only messages over a certain size (e.g. messages > 256KB)
  • Send a message which reference a message object stored in S3
  • Get a message object from S3
  • Delete a message object from S3
23
Q

Is it enough to use the SQS API or AWS CLI to manage large SQS messages?

A

No. You need:

  • AWS SDK for Java
  • SQS Extended Client Library for Java
  • An S3 bucket