Which solution meets these requirements?
Persist the messages to Amazon Kinesis Data Analytics. All the applications will read and process the messages.
Deploy the application on Amazon EC2 instances in an Auto Scaling group, which scales the number of EC2 instances based on CPU metrics.
Write the messages to Amazon Kinesis Data Streams with a single shard. All applications will read from the stream and process the messages.
Publish the messages to an Amazon Simple Notification Service (Amazon SNS) topic with one or more Amazon Simple Queue Service (Amazon SQS) subscriptions. All applications then process the messages from the queues.
Explanations:
While Kinesis Data Analytics can process data streams, it does not decouple the applications. All applications would be reading from the same data stream, creating a dependency on the analytics layer for message processing, which can lead to bottlenecks.
Deploying the application on EC2 instances in an Auto Scaling group addresses scaling based on CPU metrics but does not effectively decouple the message ingestion from the message processing. It also requires constant monitoring and may not handle sudden spikes in message volume efficiently.
Using Kinesis Data Streams with a single shard limits throughput and can become a bottleneck. For a message volume that spikes to 100,000 messages per second, a single shard will not provide the necessary scalability, as each shard can handle a maximum of 1,000 records per second or 1 MB per second.
Publishing messages to an SNS topic with SQS subscriptions effectively decouples the message ingestion from the processing. Each application can have its own SQS queue, allowing for independent scaling and processing of messages. This setup can handle high message throughput and spikes in message volume.