Amazon DVA-C01: AWS Certified Developer - Associate

Designing a Messaging System for Distributed Applications | AWS Exam Preparation

Prev Question Next Question

Question

The developer team is planning to create a new distributed application.

Most of the messages between the application components have a size larger than 256 KB.

The messages need to be polled periodically & buffered so that other components can retrieve and process.

Which of the following services would you use to design the messaging system?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer - C.

AWS SQS can be used for distributed applications for queuing messages between applications which will decouple components.

AWS SQS performs periodic polling of messages between components.

For message size larger than 256 KB, Amazon SQS Extended Client Library for Java can be used to reference message payload stored in Amazon S3.

Option A is incorrect as Amazon Kinesis Streams will be more effective in the real-time streaming of data.

Option B is incorrect as Amazon SNS is a push notification messaging service.

In this case client is looking for a polling message AWS SQS is a better option.

Option D is incorrect as AWS MQ is too heavy for this scenario.

SQS can meet the requirements and be more cost-efficient.

For more information on the use case for Amazon SQS, refer to the following URL-

https://aws.amazon.com/sqs/faqs/

Based on the requirement, the most appropriate service to use for designing the messaging system is Amazon Kinesis Streams. Here's why:

A. Amazon Kinesis Streams Amazon Kinesis Streams is a real-time data streaming service that allows you to collect and process large streams of data records in real-time. It can handle high volumes of data, and messages up to 1 MB in size. Kinesis streams can be used to poll the messages periodically and buffer them until they can be retrieved and processed by other components.

B. Amazon SNS Extended Client Library Amazon SNS (Simple Notification Service) is a fully managed messaging service that enables you to decouple and scale microservices, distributed systems, and serverless applications. While SNS supports messages up to 256 KB, the service is designed for pub/sub messaging where a message is sent to multiple subscribers. Amazon SNS Extended Client Library can be used to store messages larger than 256 KB, but it's not an ideal solution for this use case as it doesn't buffer messages for processing by other components.

C. Amazon SQS Extended Client Library Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications. While SQS supports messages up to 256 KB, the Amazon SQS Extended Client Library can be used to store messages larger than 256 KB. However, like SNS, SQS is not an ideal solution for this use case as it doesn't buffer messages for processing by other components.

D. Amazon MQ FIFO Amazon MQ is a managed message broker service for Apache ActiveMQ that makes it easy to set up and operate message brokers in the cloud. Amazon MQ FIFO is a variation of Amazon MQ that provides message ordering and deduplication for FIFO (First-In-First-Out) queues. However, Amazon MQ FIFO is not designed to handle large messages, and the service has a limit of 256 KB message size.

Therefore, based on the given requirements, the most suitable option is Amazon Kinesis Streams as it can handle messages larger than 256 KB, can buffer messages for processing by other components, and can scale to handle high volumes of data.