Messaging with AWS
AKASH KUSHWAHA
Agenda
- Queues
- Why use Queues
- How to use Queues
Message Queue
Properties
- Durability : Messages survive broker crashes.
- Asynchronicity : Sending message is asynchronous.
- Scalability : Queue should be able to scale as needed.
Message Sample
Decoupling Services
Decoupling Services..
- Message queue absorbs any increase in load.
- Consumers can scale smoothly without failing any request.
- Priority queues: Process request in order of importance.
Work Distribution
- Allow compute work to be distributed to a cluster of machines.
- Decouple cluster nodes from producer(s).
- Dynamic configuration.
Data pipelines
Chained processing:
Store intermediate data/header in queues.
AWS SQS
- Managed service. Queue as a service.
- Scalable
- Auto replication to AZs in a region
- Easy configuration
- Access management
- Plug and play Encryption
- Alarms with CloudWatch
Config
- Visibility timeout
- Inflight Messages
- Idempotent design
- Long polling
AWS FIFO Queue
- Inorder queue.
- Limited scaling.
- Scale with Message groups.
Publish–subscribe pattern
- Categorize messages into classes(Topics).
- Publisher push to topics.
- Scalability
- Flexible topology
AWS SNS
Simple Notification service.
Implementation of publish/subscribe messaging pattern.
Scaling with SNS
Sample Java
public Result processOrder(){
transaction1();
//sync or async
sendEmail();
sendSMSIfSubscribed();
pushToSlack();
updateAnalyticsDB(); //for live dashboard
pushToMobileApp();
}
public Result processOrder(){
transaction1();
pushToSNS();
}
SNS with SQS
Mobile Push Notifications
QnA
Thank you.

Messaging with aws