Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Example of .net application using Amazon SQS

I am looking for a sample .Net application that continuously checks Amazon SQS for new messages and when one is found, perform an action and remove it from the queue.

My goal is to have an app running on EC2 that watches my SQS queue for new messages. When one is found, a call will be made to one of several web based APIs and the message will be deleted from the queue.

Can someone point me to an example of something similar ?

edit Would this type of application best be created as a windows service?

like image 629
stephen776 Avatar asked Feb 26 '12 05:02

stephen776


People also ask

What is SQS in AWS with example?

Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications.

Where AWS SQS is used?

Amazon SQS is a message queue service used by distributed applications to exchange messages through a polling model, and can be used to decouple sending and receiving components.

Can SQS call an API?

You can use the AWS Javascript API in your JS app, and then use that library to make the SQS API call for you.


2 Answers

The AWS SDK for .NET features samples for several Amazon Web Services, including an Amazon SQS Sample, which demonstrates how to make basic requests to Amazon SQS using the AWS SDK for .NET.

The SDK is installed via Windows Installer and integrates with Visual Studio; by default, the desired sample ends up in C:\Program Files (x86)\AWS SDK for .NET\Samples\AmazonSQS_Sample and provides Visual Studio solutions for both versions 2008 and 2010.

like image 88
Steffen Opel Avatar answered Oct 18 '22 13:10

Steffen Opel


Windows service will be a perfect candidate for this.

The following link from amazon aws has a really good summary of details you need to pay attention to: https://aws.amazon.com/blogs/compute/building-loosely-coupled-scalable-c-applications-with-amazon-sqs-and-amazon-sns/

like image 36
Denis Wang Avatar answered Oct 18 '22 13:10

Denis Wang