AWS Async Messaging

I’ve already had an article about Serverless Challenges kind of performance and etc…

Here i want to talk about an inconvenient behavior of SNS service.

How it works?

Add alt text

Simply the SNS recieves the messages and distributes them to the subscribers which could be the SQS, Http endpoint, LambdaFunction, SES, SMS or mobile push endpoint. it will send messages as soon as they arrive.

Your SNS:

The SNS can be created using this simple template

MySNSTopic:
Type: AWS::SNS::Topic
Properties:
Subscription:
-
Endpoint:
Fn::GetAtt:
- "SQSProduct"
- "Arn"
Protocol: "sqs"
- Endpoint:
Fn::GetAtt:
- "SQSProductPropagation"
- "Arn"
Protocol: "sqs" TopicName: "SampleTopic"

The topic has two subscribers and it will distribute the messages to them. But if you need another subscriber you will change the template as bellow

MySNSTopic:
Type: AWS::SNS::Topic
Properties:
Subscription:
-
Endpoint:
Fn::GetAtt:
- "SQSProduct"
- "Arn"
Protocol: "sqs"
- Endpoint:
Fn::GetAtt:
- "SQSProductPropagation"
- "Arn"
Protocol: "sqs"
- Endpoint:
Fn::GetAtt:
- "SQSProductEnhancement"
- "Arn"
Protocol: "sqs"
TopicName: "SampleTopicEnhancedProduct"

Every thing goes well till you do this update on production, per AWS documentation the Name modification will cause the topic replacement so you will lost all your messages already in production

i'm a technial lead , solution/softwatre architect with more than 20 years of experience in IT industry,, i m a fan of cloud and serverless in practice

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

When you write a couple of classes and just realise that there are functionalities that can be…

Chingu Handbook

How to persist data in Docker Volume?

GamyFi big brand is designed to tackle conventional gaming’s key challenges.

Dynamic filtering for highly-selective join optimization

2D Shooter: Creating a Spawn Manager

Pollen DeFi: The Pre-Release Product

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
XaaXaaX

XaaXaaX

i'm a technial lead , solution/softwatre architect with more than 20 years of experience in IT industry,, i m a fan of cloud and serverless in practice

More from Medium

Apache Flux: Frictionless STORM topology management — Part 1

Why need of consistent hashing ???

Where should you store your application secrets, you wonder?

Redis Journey and Keyspace Notification processing using RedisGears