In this article, we are going to follow on the previous parts to build a reusable queue service that can process generic messages.
We are going to introduce a concept called Jobs. A job is a piece of code that is executed given a specific data input. So instead of having multiple queue for multiple type of messages, we are going to have one queue that can process an infinite number of message types (or jobs).
The public IJob interface is defined as below.
public interface IJob
Task ExecuteAsync(string jsonPayload);
In order to be easier to implement, we…
This is the Part 2 of this series. You can read the Part 1 here.
As mentioned in my previous post, we need to code a “more production ready” version of the tutorial.
This post will focus on implementing best practices so you will have a good starting point for your worker application.
You want to go straight to it? Go directly to the source code available here :
The solution includes three projects:
The scope of this article it to get you started building a SQS background services using .NET 5 (should work with 3.1 as well).
SQS stands for Simple Queue Service. That is, it’s a queue service. What you can do with it is pretty straightforward.
What happens when something fails? Well, the message stay in the queue for reprocessing until future success. …
I’m a .NET developer with almost 20 years of experience. I have 7 years of experience with the AWS stack. I’m a businessman having founded two companies.