Search code examples
amazon-web-servicesasp.net-coreamazon-sqsamazon-sns

AWS SQS and SNS with .NET core


I want to implement a publish/subscribe system inside my Micro service application on top of .NET CORE, and since I've everything built on top of AWS, I started to check SQS.

But from what I understood, SQS is only a queue that doesn't offer me that possibility, so yes I can send and read messages to the queue, but I can't have my clients consuming in real time based on topic and sending messages to every client that is subscribing to that topic, right? That's why they have SNS.

From what I understand in order to use SNS, we will always need to have SQS too, but what I'm not finding is how can I integrate SNS on .NET Core? Is there a good tutorial? Because for SQS there's plenty, but for SNS I'm not finding much.


Solution

  • "I'm not finding is how can I integrate SNS on .NET"

    There is a brand new AWS tutorial (only a few days old) that shows how to use the AWS.NET API to create an MVC .NET app that uses the .NET SNS API to write a pub/sub app. This example uses .NET async calls as well.

    enter image description here

    https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/dotnetv3/cross-service/SubscribePublishTranslate