![]() ![]() We're going to create 2 services - Service A and Service B using AWS Lambda. Producer and Consumer service creation using Lambda const queue = new sqs.Queue(this, 'AwsLambdaSqsQueue') SQS queue creation You can use below code snippet to create Standard SQS queue. We'll create above architecture using AWS CDK Let's write some code to see it in action. So, when the Service B comes up again - it can pick up where it left off - processing all the remaining messages in the queue. When Service B goes down - the messages sent by Service A would be still in SQS queue. Microservices with queuing system (Lambda-SQS) ![]() Instead of directly sending messages between services, we use a queuing system with SQS Queue as intermediary. In below diagram, these are same services ( Service A and Service B ) backed by AWS Lambda. In this scenario, messages would get lost, which you might not want to happen. ![]() What would happen to the messages sent by Service A?
0 Comments
Leave a Reply. |