The document summarizes a MuleSoft meetup on using Amazon SNS and SQS. It provides an agenda that includes an overview of SNS and SQS, how to set them up, a demo of using them together to decouple systems, and time for Q&A. The demo problem involves using SNS topics to represent stocks and an SQS queue to log events whenever a stock price changes. The document also lists configurations needed to connect SNS and SQS and publish/receive messages.
3. Safe Harbour Statement
● Both the speaker and the host are organizing this meet-up in individual capacity only. We are
not representing our companies here.
● This presentation is strictly for learning purposes only. Organizer/Presenter do not hold any
responsibility that same solution will work for your business requirements.
● This presentation is not meant for any promotional activities.
3
4. A recording of this meetup will be uploaded to events page within 24 hours.
Questions can be submitted/asked at any time in the Chat/Questions & Answers
Tab. Make it more Interactive!!!
Give us feedback! Rate this meetup session by filling feedback form at the end of the
day.
We Love Feedbacks!!! Its Bread & Butter for Meetup.
Housekeeping
4
9. ● This managed AWS resource is central to the idea of a pub/sub model,
wherein a publisher can publish messages to topics with subscribers being
subscribed to those topics.
● In the event of a message being received on such a topic, all the
subscribers of that topic will get notified.
● These subscribers can be as varied and as vast as your imagination
might extend, starting right from Amazon Kinesis Data Firehose delivery
streams to Lambda functions, Amazon SQS queues to HTTP/S endpoints,
and even Email or SMS endpoints.
● Published messages are stored across multiple, geographically
separated servers and data centers, so your data is safe and durable.
AWS Simple Notification
Service (SNS) Overview
10. AWS Simple Queue Service
(SQS) Overview
● This secure, durable, and available hosted queue lets us integrate and
decouple distributed software systems and components.
● SQS allows greater control on what can be done with a message,
including robust capabilities like visibility timeouts, delay queues and dead
letter queues.
● SQS uses redundant infrastructure to provide highly-concurrent
access to messages and high availability for producing and consuming
messages.
● Choose to transmit sensitive data by protecting the contents of
messages in queues by using default Amazon SQS managed server-side
encryption (SSE), or by using custom SSE keys managed in AWS Key
Management Service (AWS KMS)
11. Problem Statement
● Building a pub/sub approach to achieving decoupling
○ SQS Queue - main-stock-queue
○ SNS Topics - GOOGL, GM, CVS
● Whenever an event is posted to any of the SNS Topics (that
mimic real stocks), the SQS queue must immediately
respond back and log that event - analogous to a live stock
alerting mechanism
13. Behind the Scenes
Who → “Principal”
What → “Action”
Which → “Resource”
When → “Condition”
14. General configurations and
allied properties
Parameters Involved (encrypted using security module)
● aws.access-key → AWS access key ID
● aws.secret-key → AWS secret key
● sns.test-topic → ARN of the SNS test topic
(arn:aws:sns:us-east-1:xxxxxxxx:PG)
● sns.arn-pattern → ARN pattern of the SNS topics
(arn:aws:sns:us-east-1:xxxxxxxx:) to publish messages to
● sqs.arn → ARN of the main SQS queue
(arn:aws:sqs:us-east-1:xxxxxxxx:main-stock-queue)
● sqs.url → URL of the main SQS queue
(https://sqs.us-east-1.amazonaws.com/xxxxxxxx/main-stock-queue)
Note - I am using Basic Connection type for both my SQS and SNS connectors, which
requires you to generate AWS Access key (access key ID and secret access key)
16. Take a stand !
● Nominate yourself for the next meetup speaker and suggest a topic as well.
21
17. ● Share:
○ Tweet or share using the hashtag #MuleSoftMeetups
○ Invite your network to join: https://meetups.mulesoft.com/patna/
● Feedback:
○ Fill out the survey feedback and suggest topics for upcoming events
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program
○ Reach out to Patna Meetup Leaders (Om/Amit/Shyam) to suggest topics for
next Meetup
23
What’s next?