Skip to content

Sample code for the NimblePros series on NServiceBus with .NET 8

License

Notifications You must be signed in to change notification settings

KyleMcMaster/NServiceBusTutorial

Repository files navigation

NServiceBusTutorial

Sample code for the NimblePros series on NServiceBus with .NET 8

Background Information

This project serves to explain in code the concepts of NServiceBus. The project is broken down into multiple parts, each part focusing on a different aspect of NServiceBus. This code is meant to be a companion to the blog series on NServiceBus by NimblePros. I will try to tag the codebase when each article is published so that you can follow along with the blog series but for the most part, the code should be backward compatible as the series progresses. Any configuration or manual build steps will be documented in this README file to make it easier to follow along.

Projects

NServiceBusTutorial.Web

A Web API project that sends messages to the NServiceBusTutorial.Worker endpoint.

NServiceBusTutorial.Worker

A Worker Service project that receives messages from the NServiceBusTutorial.Web endpoint.

NServiceBusTutorial.Saga

An NServiceBus Saga that keeps track of the Contributors verification workflow.

Diagrams

Simple Diagram (pre-saga)

Simplified Architecture

Sequence Diagrams For Contributor Verification

Verified Flow

Verified Flow

Not Verified Flow

Not Verified Flow

Dependencies

Transports

Currently, this project uses LearningTransport which automatically configures a file-based queue at the root of the repository when the applications start. This is useful for development and testing but should not be used in production.

Persistence

Currently, this project uses LearningPersistence for saga persistence by storing data in the file system. This is useful for local development but should not be used in production.

Resources

NimblePros blog posts on NServiceBus

1: What is NServiceBus?

2: Getting Started with NServiceBus?

3: Commands, Events, and Messages Explained

4: Testing NServiceBus Message Handlers

5: Supercharged Sagas - Introduction

6: Supercharged Sagas - Creating Your First NServiceBus Saga

7 : Supercharged Sagas - Timeout Tips

8 : Supercharged Sagas - Unit Testing Strategies