Enterprise Messaging — Use Case

SQS — MQ Service in AWS case study:

ivsntejesh
4 min readMar 1, 2021

Messaging is used to communicate between two applications, it can be an order processing application, Inventory application, Database application, Front end application. Messaging is also used in Modern techniques of Microservices.

Generally messaging is done through some products like IBM MQ, Apache MQ, Active MQ, Rabbit MQ (open source).

We have two types of communications.

1: Synchronous communication which is basically application to application through APIs.

2: Asynchronous / Event-based which is an application to queue to application.

Synchronous communication between applications can be problematic if there are sudden increases in traffic. It’s better to decouple your applications in the real world.

source: AWS-reinvent, 2016

This is synchronous, point to point, also called Tightly Coupled. If there is any issue with the endpoint such as network failure, the instance is down, hence the message is not delivered and the message is lost.

Use cases for message queue:

  • It decouples the application components, Microservices.

With decoupling, we can run applications independently, scale and manage the applications separately. It allows applications to be fault-tolerant, runs in different environments. (OS, Language).

  • It is resilient to spikes in traffic.
  • Data is never lost.

Some of the challenges faced in Message-oriented Middleware:

  • Operational overhead
  • Cost
  • Maintainance
  • Scalability
  • Future planning of resources

AWS SQS:

AWS- Simple Queue Service

AWS provides us with a fully managed messaging service called SQS (Simple Queue Service). It is one of the most powerful services provided by AWS. It is also the oldest service by AWS. Launched in late 2004.

SQS architecture:

It is a serverless service that is fast, reliable, scalable, fully manages service.

Benefits of using AWS SQS:

  • Persistent storage with high durability and availability
  • The message is stored for max up to 14 days.
  • A maximum of 256KB of the message can be sent.
  • High throughput
  • Integrated with Amazon Cloudwatch
  • IAM security
  • Auto-scaling group

SQS comes with two types of queue support, Standard (at least once message delivery) and FIFO queue (exactly-once message processing) support.

source: AWS-reinvent, 2016

Let us study the use case of AWS SQS of CapitalOne.

Case study:

Founded in 1994, Capital One Financial Corporation is an American bank holding company specializing in credit cards, auto loans, banking, and savings accounts, headquartered in McLean, Virginia with operations primarily in the United States.

It is the 9th largest bank based on deposits in the US. A fortune 500 company ranked 97 for the year 2020.

Capital One used JBOSS based JMS message queue for their application. It has some challenges namely,

  • downtime for maintenance of servers, It requires supporting infrastructure.
  • Updates into JMS server.
  • Requires excessive queue servers to run application servers.
  • Scalability issues.
  • Monitoring, difficult to find failures.

The previous model of MQ used by Capital One

source: AWS-reinvent, 2016

We can see the new integration architecture followed by Capital One for their message queue. With this, they can scale their application, Manage easily, Check for any failures. They can integrate with other services like S3, EC2, Lambda, ASG (Auto Scaling Group), IAM, SNS, etc…

source: AWS-reinvent, 2016

With the integration of SQS in their applications they are able to seamlessly send the messages to MQ, Middleware then polls for message and stores it in either DataBase or send the message to another queue for another request.

The message is also sent to 3rd party apps for further processing. After the request has been successful the message is sent to the reply queue. The front end displays the result to the users.

SQS also comes with different constructors that help in the maintenance of messages. It has a Death Letter Queues, Visibility timeout, Delivery delay, retention period.

It also provides an option for at-rest encryption. It can be integrated with other services like AWS Lambda, S3, EC2.

SQS is a simple service that has a lot of applications in the industry.

That’s it for SQS, Hit a clap if you find it useful.

--

--