AWS SQS

Amazon Simple Queue Service (SQS) is a managed message queue service offered by Amazon Web Services (AWS). It is a distributed queue system that enables web service applications to quickly and reliably queue messages that one component in the application generates to be consumed by another component where a queue is a temporary repository for messages that are awaiting processing.

Using SQS, you can send, store and receive messages between software components at any volume without losing messages.

What is message queue (MQ)?

Message queueing is a method by which process (or program instances) can exchange or pass data using an interface to a system-managed queue of messages. Messages can vary in length and be assigned different types or usages. A message queue can be created by one process and used by multiple processes that read and/or write messages to the queue. For example, a server process can read and write messages from and to a message queue created for client processes.

There is lots of products available in market to implement this message queue. One of them is AWS SQS. Its a managed service for MQ.

Some Advantages of AWS SQS :

> SQS is simple to get started with and configure if you are new to using both AWS and if you are new to using this particular service.

> Pricing for SQS is surprisingly less complicated than other services in AWS and is pretty reasonable.

> SQS triggers are a game changer. They allow more robust decoupled, scalable, event-driven serverless architectures, and they also trigger some awesome side effects when used properly.

> Options for a FIFO and Standard queue, so anyone can choose on the base of their requirements.

> Has an add-on functionality of configurable parameters, like Delivery Delay, Default Visibility Timeout, Message Retention Period, Receive Message Wait Time, etc.

> Provides very good support for asynchronous processes.

> SQS allows data to be encrypted in transit, which may be required for compliance in some products.

Use cases of AWS SQS :

There are lots of usecases of AWS SQS. Some of them are :

1. Consider a sender component ‘A’ and receiver component ‘B’. Now A is sending a messages to B at a higher rate than the rate receiver B can process. This creates a serious problem of losing messages in transit.
To prevent messages getting lost, a SQS queue can be introduced to act as a buffer to prevent loss of messages. The messages are stored in the queue in transit and then delivered to the receiver.
This was one of the simplest usecase of SQS.

2. Sending notifications to a customer where order is critical. In this types of usecases, we can use FIFO queues. FIFO queues are useful for applications that depend on the order of the events and / or need message de-duplication to built into the queue itself.

3. Analyze the contents of messages delivered to a dead-letter queue to diagnose software or the producer’s or consumer’s hardware issues. The main task of a dead-letter queue is handling message failure. A dead-letter queue lets you set aside and isolate messages that can’t be processed correctly to determine why their processing didn’t succeed.

4. We can also integrate SQS with AWS Lambda and S3 and add trigger and Destination in Lambda, if any object is added to S3 bucket, It triggers Lambda, if Lambda function runs successfully, we can add SQS as destination for this, so message will be recieved by reciever in SQS. Similarly we can add trigger for failure, then some other SQS will recieve message and do some other work.

Thank you!!

--

--

--

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

Recommended from Medium

How Can You Build Your Docker Image on MacOs with GitHub Actions CI Pipeline?

Minimizing cost over-runs in IoT services with Hardware traceability Matrix

Quick ways of earning $2,000 per wevia Python

Importance of Date and Time in the programming world.

Object Oriented Programming: Liskov substitution principle

Dagger 2 in Nutshell

Compelling use case of Regex Programming

Accelerate Distributed Applications with Memcached

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
Priyanka Gavali

Priyanka Gavali

More from Medium

Deploying a Secure Static Site to AWS with S3, Route 53 and CloudFront

Cost Optimization | AWS | EBS Volumes

Building AWS Amplify app on a GoDaddy domain

post fix install and configure with AWS SES