9/14/2023 0 Comments Aws tag sns topic sqs queue![]() Our goal here is to detect and remediate the SNS topic and SQS queue. And to understand the working of the combination of SNS and SQS, Jeff Barr's post SQS Queues and SNS Notifications – Now Best Friends (also the 4th use-case listed above) explains how both the services together makes a best pair for decoupling.In this scenario, we have a use case where a customer accidentally created a SNS topic and SQS queue without encryption. SNS and SQS have their own advantages and limitations making it an evaluation-based choice for the Cloud Architects/Developers to choose either SNS or SQS or the combination of two. SQS Limits : Service end-points Service quotas SNS Limits : Service end-points Service quotas Whenever taking a choice of service for your event-driven architecture which is also loosely coupled, understand the limits of the service itself. ✅ Load control your Lambda fn with various fan-out options ✅ Multiple sub-modules of the Lambda fn can be individual subscribers to the topic Single subscriber processing each message ✅ These SQS queues can process each type of meta-data generation ✅ Topic can send a message to multiple other subscribers which be SQS queues Process an image and get the meta-data via other AWS services On a certain action sending email / mobile push / SMS message SQS does not delivery to multiple consumers at the same time even if there are multiple Lambda fns or even SNS topics as triggers for the queue but if anyone of the consumer deletes the message when polled, it is lost for all the consumers. As SQS uses the polling mechanism, there is a latency with message delivery. SQS supports good batch processing of upto 10 messages per batch.ĭLQ can get over-filled if there is some error in delivering huge amount of messages. A Dead-letter Queue (DLQ) can also be configured for capturing undelivered messages. The SQS can be configured with different fan-out periods - Visibility timeout (0s - 12 hours), Message retention period(1 min - 14 days, Delivery delay(0s - 15 mins), Maximum message size (1KB - 256KB), Receive message wait time (0s - 20s). SQS messages are stored and available upto 14 days. Simple Queue Service (SQS) is a distributed queue model where the consumer should poll the queue to check if a new message has been pushed into the queue. Key things to keep-in-mind when choosing SQS That been said, if a topic exists with 0 subscribers, if the message is pushed to the topic, that message is lost. The down-side of SNS is the message once sent to the subscriber, it is not available but if undelivered, based on the retry configuration message is available until it is successfully delivered. There can be scenarios where you can decide to send a SMS message to the subscriber or send an email message to the subscriber based on the message itself with the feature of message filtering with attributes. With SNS, we can integration with Amazon Device Messaging, Apple Push Notification Service, Firebase Cloud Messaging and other popular providers to send push notifications to the mobile app. SNS provides the feasibility of having multiple subscribers (Standard topics : max 12,500,000 subscriptions and FIFO topics : max 100 subscriptions) and all the subscribers of the topic receive the message, and the multiple subscribers can be across various other types - email message, Lambda fn invocation, posting to a SQS queue, invoke an HTTP end-point, sending a SMS message, a mobile push notification with all the possible combinations. ![]() Simple Notification Service (SNS) is a distributed pub-sub model where the messages are pushed to the subscriber. Key things to keep-in-mind when choosing SNS This blog post will explain what to choose and how to choose between SNS or SQS for your architecture. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |