Chapter 7 - APPLICATION INTEGRATION: Amazon SQS, Amazon SNS, Amazon MQ, Amazon SWF, AWS Step Functions, AWS AppSync Flashcards
How is SQS different from SNS? Choose 2.
- SNS is a distributed publish-subscribe system. Messages are pushed to subscribers as and when they are sent by publishers to SNS.
- SQS is distributed queuing system. Messages are NOT pushed to receivers. Receivers have to poll or pull messages from SQS.
- SNS is a distributed publish-subscribe system. Messages are polled by subscribers as and when they are sent by publishers to SNS.
- SQS is distributed queuing system. Messages are pushed to receivers.
- SNS is a distributed publish-subscribe system. Messages are pushed to subscribers as and when they are sent by publishers to SNS.
- SQS is distributed queuing system. Messages are NOT pushed to receivers. Receivers have to poll or pull messages from SQS.
- SNS is a distributed publish-subscribe system. Messages are polled by subscribers as and when they are sent by publishers to SNS.
- SQS is distributed queuing system. Messages are pushed to receivers.
You have on-premise distributed applications connected through message broker supporting JMS APIs and AMQP/ MQTT Protocols. You are planning to migrate the whole application portfolio to AWS and re-develop using native AWS services. Which AWS service should you use to replace the message broker architecture layer?
- Amazon Message Broker
- Amazon SQS
- Amazon SWF
- Amazon MQ
- Amazon Message Broker
- Amazon SQS
- Amazon SWF
- Amazon MQ
Which of the following statements are correct about SQS Standard Queues? Choose 2.
- Makes a best effort to preserve the order of messages, but more than one copy of a message might be delivered out of order.
- The order in which messages are sent and received is strictly preserved and a message is delivered once and remains available until a consumer processes and deletes it.
- Duplicates aren’t introduced into the queue.
- Ensures At-Least-Once Delivery but may result in duplicate messages on rare occasions.
- Makes a best effort to preserve the order of messages, but more than one copy of a message might be delivered out of order.
- The order in which messages are sent and received is strictly preserved and a message is delivered once and remains available until a consumer processes and deletes it.
- Duplicates aren’t introduced into the queue.
- Ensures At-Least-Once Delivery but may result in duplicate messages on rare occasions.
How does Amazon SQS provide message ordering?
- SQS doesn’t provide message ordering
- Through FIFO: First In First Out queues
- Through Standard Queues
- Through LIFO: Last In First Out queues
- Through LILO: Last In Last Out queues
- SQS doesn’t provide message ordering
- Through FIFO: First In First Out queues
- Through Standard Queues
- Through LIFO: Last In First Out queues
- Through LILO: Last In Last Out queues
Which AWS service you will use if you have to build, run, and scale background jobs that have parallel or sequential steps?
- Amazon Lambda
- Amazon Simple Workflow Service (SWF)
- Amazon Simple Queue Service ( SQS)
- Amazon Simple Notification Service ( SNS)
- Amazon Lambda
- Amazon Simple Workflow Service (SWF)
- Amazon Simple Queue Service ( SQS)
- Amazon Simple Notification Service ( SNS)
What is visibility timeout in SQS?
- A period of time during which Amazon SQS makes the message available to other consumers to receive and process the message.
- A period of time during which Amazon SQS prevents other consumers from receiving and processing the message.
- A period of time for which delivery of new message is postponed.
- A period of time during which a message is processed by the consumer.
- A period of time during which Amazon SQS makes the message available to other consumers to receive and process the message.
- A period of time during which Amazon SQS prevents other consumers from receiving and processing the message.
- A period of time for which delivery of new message is postponed.
- A period of time during which a message is processed by the consumer.
What is delay queue in SQS?
- A period of time during which Amazon SQS makes the message available to other consumers to receive and process the message.
- A period of time during which Amazon SQS prevents other consumers from receiving and processing the message.
- A period of time for which delivery of new message is postponed.
- A period of time during which a message is processed by the consumer.
- A period of time during which Amazon SQS makes the message available to other consumers to receive and process the message.
- A period of time during which Amazon SQS prevents other consumers from receiving and processing the message.
- A period of time for which delivery of new message is postponed.
- A period of time during which a message is processed by the consumer.
Which architecture design consideration will make you choose SQS standard queue over FIFO queue?
- At-Least-Once Delivery, Unlimited Throughput, Best-Effort Ordering
- High Throughput, Exactly-Once Processing, First-In-First-Out Delivery
- Best-Effort Ordering, First-In-First-Out Delivery, Exactly-Once Processing
- At-Least-Once Delivery, Unlimited Throughput, Exactly-Once Processing,
- At-Least-Once Delivery, Unlimited Throughput, Best-Effort Ordering
- High Throughput, Exactly-Once Processing, First-In-First-Out Delivery
- Best-Effort Ordering, First-In-First-Out Delivery, Exactly-Once Processing
- At-Least-Once Delivery, Unlimited Throughput, Exactly-Once Processing,
The minimum and maximum SQS delay queue settings are?
- 0 secs, 15 mts
- 15mts, 30 mts
- 5mts, 15 mts
- 10 sec, 15mts
- 0 secs, 15 mts
- 15mts, 30 mts
- 5mts, 15 mts
- 10 sec, 15mts
By default for how many days messages are retained in SQS queue?
- 1 minute
- 2 days
- 4 days
- 14 days
- 1 minute
- 2 days
- 4 days
- 14 days
You are using Amazon SQS in your ecommerce application to send order confirmation email asynchronously. You have created a program which polls the SQS queue frequently for new order message and then sends the email after fetching new order message from the queue. You observe that at times the program is getting empty response to the ReceiveMessage request. What should you do to eliminate empty responses to reduce cost?
- Create a delay queue.
- Increase the duration of visibility timeout value to higher number.
- Make wait time for the ReceiveMessage API action is greater than 0 to effect long polling.
- Make wait time for the ReceiveMessage API action is greater than 0 to effect short polling.
- Create a delay queue.
- Increase the duration of visibility timeout value to higher number.
- Make wait time for the ReceiveMessage API action is greater than 0 to effect long polling.
- Make wait time for the ReceiveMessage API action is greater than 0 to effect short polling.
In Amazon SQS what is the difference between delay queue and visibility time out?
- There is no difference, both of them are same as they make messages unavailable to consumers for a specific period of time.
- Delay queues makes a message hidden when it is first added to queue, whereas for visibility timeouts a message is hidden only after it is consumed from the queue.
- Delay queues makes a message hidden after it is consumed from the queue, whereas for visibility timeouts a message is hidden when it is first added to queue.
- There is no difference, both of them are same as they make messages available to consumers for a specific period of time.
- There is no difference, both of them are same as they make messages unavailable to consumers for a specific period of time.
- Delay queues makes a message hidden when it is first added to queue, whereas for visibility timeouts a message is hidden only after it is consumed from the queue.
- Delay queues makes a message hidden after it is consumed from the queue, whereas for visibility timeouts a message is hidden when it is first added to queue.
- There is no difference, both of them are same as they make messages available to consumers for a specific period of time.
Which architecture design consideration will make you choose FIFO queue over SQS standard queue?
- At-Least-Once Delivery, Unlimited Throughput, Best-Effort Ordering
- High Throughput, Exactly-Once Processing, First-In-First-Out Delivery
- Best-Effort Ordering, First-In-First-Out Delivery, Exactly-Once Processing
- At-Least-Once Delivery, Unlimited Throughput, Exactly-Once Processing,
- At-Least-Once Delivery, Unlimited Throughput, Best-Effort Ordering
- High Throughput, Exactly-Once Processing, First-In-First-Out Delivery
- Best-Effort Ordering, First-In-First-Out Delivery, Exactly-Once Processing
- At-Least-Once Delivery, Unlimited Throughput, Exactly-Once Processing,
Which of the following is correct about message delivery to SQS Standard queue? Choose 2.
- Messages are delivered at least once.
- Messages are delivered only once.
- Messages are delivered in FIFO.
- Attempts to preserve the order of messages.
- Messages are delivered at least once.
- Messages are delivered only once.
- Messages are delivered in FIFO.
- Attempts to preserve the order of messages.
What is the minimum and maximum retention time for which messages can be retained in SQS queue? Choose 2.
- 1 minute
- 2 days
- 4 days
- 14 days
- 1 minute
- 2 days
- 4 days
- 14 days
What is default visibility timeout period for a message in SQS?
- 1 minute
- 0 seconds
- 30 seconds
- 2 minute
- 1 minute
- 0 seconds
- 30 seconds
- 2 minute
What is minimum and maximum visibility timeout period for a message in SQS? Choose 2.
- 12 hours
- 14 days
- 30 seconds
- 0 seconds
- 12 hours
- 14 days
- 30 seconds
- 0 seconds
What are the different methods using which message can be delivered to a subscriber to a SNS topic? Choose 2.
- AWS lambda, AWS SQS, HTTP/s
- Email, SMS
- AWS lambda, AWS SQS, HTTP/s, S3
- Email, SMS, DynamoDB
- AWS lambda, AWS SQS, HTTP/s
- Email, SMS
- AWS lambda, AWS SQS, HTTP/s, S3
- Email, SMS, DynamoDB
What is a ‘fan out ‘scenario?
- A publisher sends same message to multiple SNS topics or SQS queues
- Amazon SNS message is sent to a topic and then replicated and pushed to multiple Amazon SQS queues, HTTP endpoints, or email addresses.
- Message is sent to a SQS queue and then replicated and pushed to multiple Amazon SNS topics.
- Message is sent to a SQS queue and then replicated and pushed to multiple Amazon SQS queues.
- A publisher sends same message to multiple SNS topics or SQS queues
- Amazon SNS message is sent to a topic and then replicated and pushed to multiple Amazon SQS queues, HTTP endpoints, or email addresses.
- Message is sent to a SQS queue and then replicated and pushed to multiple Amazon SNS topics.
- Message is sent to a SQS queue and then replicated and pushed to multiple Amazon SQS queues.
You are the solution architect of a financial services company. You are planning to use Amazon SQS while designing a distributed trading application. Key functional requirements pertaining to message queue are: processing of the messages in a sequential order, message should be processed only once and there should not be duplicate messages in the queue. How will you ensure the above requirements? Choose 3 options.
- Use SQS Standard Queues.
- Use SQS FIFO queues.
- Use SWF FIFO.
- Enable content-based deduplication.
- Explicitly provide the message deduplication ID (or view the sequence number) for the message.
- Use SQS Standard Queues.
- Use SQS FIFO queues.
- Use SWF FIFO.
- Enable content-based deduplication.
- Explicitly provide the message deduplication ID (or view the sequence number) for the message.
You are designing a stock trading application. Your design includes using SQS for receiving trade confirmation messages from third party systems. You want to have the ability to isolate messages that can’t be processed correctly to determine why their processing didn’t succeed. How can you achieve this?
- Map the Standard or FIFO Queue to S3 to store the exception messages.
- Create a logic in message processing program to store the exception messages in DynamoDB.
- Create an Amazon SQS Dead Letter Queue
- Create an Amazon SQS Exception Queue
- Map the Standard or FIFO Queue to S3 to store the exception messages.
- Create a logic in message processing program to store the exception messages in DynamoDB.
- Create an Amazon SQS Dead Letter Queue
- Create an Amazon SQS Exception Queue
You want to offer an online photo processing services for consumers. Users can upload the photo to the website and specify different operations like redeye reduction, cropping, thumb nail creation, photo filter, contract, brightening etc. Users can submit from few to hundreds of photos at a time. Which AWS services you will use to build a scalable and reliable web application?
- Webserver- EC2, Web Database – RDS, Photo Asynchronous processing – SQS- Lambda, Photo Storage- RDS
- Webserver- EC2, Web Database – RDS, Photo Asynchronous processing – SWF- Lambda, Photo Storage- S3
- Webserver- EC2, Web Database – RDS, Photo Asynchronous processing – SNS- Lambda, Photo Storage- S3
- Webserver- EC2, Web Database – RDS, Photo Asynchronous processing – SQS- Lambda, Photo Storage- S3
- Webserver- EC2, Web Database – RDS, Photo Asynchronous processing – SQS- Lambda, Photo Storage- RDS
- Webserver- EC2, Web Database – RDS, Photo Asynchronous processing – SWF- Lambda, Photo Storage- S3
- Webserver- EC2, Web Database – RDS, Photo Asynchronous processing – SNS- Lambda, Photo Storage- S3
- Webserver- EC2, Web Database – RDS, Photo Asynchronous processing – SQS- Lambda, Photo Storage- S3
You are using SQS FIFO queue in your web application for asynchronous processing of messages. While doing unit testing you notice that producer is sending the message to queue successfully but downstream functional steps to be executed on message processing is not getting executing completely and there is an exception in the logs. After doing debugging you notice that at first, consumer program is picking up each unique message and then that message again reappears in the queue after the visibility time set of 5 minutes. Then that reappeared message is again picked up by the consumer program and reappears again. What could be the reason?
- Visibility time of 5 mts is less than the time required by consumer program to process the message.
- Message processing is failing because of which message reappears in the queue as consumer program is not deleting it from queue.
- Message processing is successful but consumer program is not deleting the message from the queue.
- Producer is sending duplicate messages into the queue.
- Visibility time of 5 mts is less than the time required by consumer program to process the message.
- Message processing is failing because of which message reappears in the queue as consumer program is not deleting it from queue.
- Message processing is successful but consumer program is not deleting the message from the queue.
- Producer is sending duplicate messages into the queue.