Example of .net application using Amazon SQS

核能气质少年 提交于 2019-12-12 09:30:47

问题


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?


回答1:


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.




回答2:


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/



来源:https://stackoverflow.com/questions/9450721/example-of-net-application-using-amazon-sqs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!