MQ Flashcards

1
Q

SQS and SNS are called

A

“cloud-native” services. That means that they’re using proprietary protocols that are just available on AWS.

they scale really well, we don’t manage them, they’re kind of serverless.

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

But, traditional applications, when they run on-premise,

they are also been using queues and topics and notification systems.

A

they’ve been using their own little protocol, so you can be MQTT, AMQP, STOMP, Openwire, WSS. And so when you migrating one of these application to the cloud, you don’t want to re-engineer all the application messaging layer to use SQS and SNS.

Amazon MQ is an in-between way

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

Amazon MQ

A

is a managed Apache ActiveMQ.
we can use an hosted MQTT queue in the cloud, and that hosted MQTT queue in the cloud is Amazon MQ.

doesn’t “scale” as SQS/SNS,

it’s because we have to provision it,

runs on a dedicated machine,

we can still have high availability with failover doing multi-AZ.

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

Apache ActiveMQ

A

is a great way of doing, you know, messaging, such as

only using the protocol MQTT, etc.

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

Amazon MQ features

A

has both a queue feature and a topic feature.

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

for exam

A

if you see we are migrating an app from on-premise with cloud, and the app is using the MQTT or the AMQP protocol or whatever, the answer is Amazon MQ.

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

You are preparing for the biggest day of sale of the year, where your traffic will increase by 100x. You have already setup SQS standard queue. What should you do?

A

do nothing, SQS scales automatically

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

You would like messages to be processed by SQS consumers only after 5 minutes of being published to SQS. What should you do?

A

increase DelaySeconds parameter

Delay queues let you postpone the delivery of new messages to a queue for a number of seconds. If you create a delay queue, any messages that you send to the queue remain invisible to consumers for the duration of the delay period. The default (minimum) delay for a queue is 0 seconds. The maximum is 15 minutes

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

Your consumers poll 10 messages at a time and finish processing them in 1 minute. You notice that your messages are processed twice, as other consumers also receive the messages. What should you do?

A

increase Visibility Timeout

Immediately after a message is received, it remains in the queue. To prevent other consumers from processing the message again, Amazon SQS sets a visibility timeout, a period of time during which Amazon SQS prevents other consumers from receiving and processing the message. Increasing the timeout gives more time to the consumer to process that message and will prevent duplicate readings of the message

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

You’d like your messages to be processed exactly once and in order. Which do you need?

A

SQS FIFO Queue

FIFO (First-In-First-Out) queues are designed to enhance messaging between applications when the order of operations and events is critical, or where duplicates can’t be tolerated. FIFO queues also provide exactly-once processing but have a limited number of transactions per second (TPS).

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

You’d like to send a message to 3 different applications all using SQS. You should

A

SNS + SQS Fan out pattern

This is a common pattern as only one message is sent to SNS and then “fan out” to multiple SQS queues

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

You have a Kinesis stream usually receiving 5MB/s of data and sending out 8 MB/s of data. You have provisioned 6 shards. Some days, your traffic spikes up to 2 times and you get a throughput exception. You should

A

add more shards

Each shard allows for 1MB/s incoming and 2MB/s outgoing of data

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

You are sending a clickstream for your users navigating your website, all the way to Kinesis. It seems that the users data is not ordered in Kinesis, and the data for one individual user is spread across many shards. How to fix that problem?

A

you should use a partition key that represents the identity of the user

By providing a partition key we ensure the data is ordered for our users

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

We’d like to perform real time analytics on streams of data. The most appropriate product will be

A

Kinesis Analytics is the product to use, with Kinesis Streams as the underlying source of data

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

We’d like for our big data to be loaded near real time to S3 or Redshift. We’d like to convert the data along the way. What should we use?

A

Kinesis Streams + Kinesis Firehose

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

You want to send email notifications to your users. You should use

A

SNS

17
Q

You have many microservices running on-premise and they currently communicate using a message broker that supports the MQTT protocol. You would like to migrate these applications and the message broker to the cloud without changing the application logic. Which technology allows you to get a managed message broker that supports the MQTT protocol?

A

Amazon MQ

18
Q

Amazon MQ supports

A

JMS, NMS, AMQP, STOMP, MQTT, and WebSocket