.NET Microservices: CQRS & Event Sourcing with Kafka

Learn how to create microservices in C# that are based on CQRS and Event Sourcing. Powered by .NET and Apache Kafka.

4.42 (1081 reviews)
Udemy
platform
English
language
Software Engineering
category
instructor
.NET Microservices: CQRS & Event Sourcing with Kafka
6,975
students
8.5 hours
content
Sep 2023
last update
$79.99
regular price

What you will learn

CQRS

Event Sourcing

How to Create Microservices in C# with .NET

Creating DDD-Oriented Microservices

Using Apache Kafka as a Message Bus

Creating an Event Store with MongoDB

Optimistic Concurrency Control

Event Versioning

Using Microsoft SQL to Implement the Read Database

Replay the Event Store and Recreate the State of the Aggregate

Replay the Event Store and Recreate the Entire Read Database

Replay the Event Store and Recreate the Read Database in a Different Database Type - PostgreSQL

Implementing the Database-Per-Service Pattern

Entity Framework Core (MS SQL and PostgreSQL)

Dependency Injection

Docker

Why take this course?

In this course, you will learn how to create .NET microservices that comply with the CQRS and Event Sourcing patterns.

You will not use any CQRS framework, but you will write every line of code that is required to effectively create your own CQRS and Event Sourcing framework using C# and Apache Kafka. While this might sound a little daunting, you will be carefully guided step by step, and gain all the know-how and confidence to become an expert in CQRS and Event Sourcing.

By the end of this course, you will know how to:

  • Handle commands and raise events.

  • Use the mediator pattern to implement command and query dispatchers.

  • Create and change the state of an aggregate with event messages.

  • Implement an event store / write database in MongoDB.

  • Create a read database in MS SQL.

  • Apply event versioning.

  • Implement optimistic concurrency control.

  • Produce events to Apache Kafka.

  • Consume events from Apache Kafka to populate and alter records in the read database.

  • Replay the event store and recreate the state of the aggregate.

  • Separate read and write concerns.

  • Structure your code using Domain-Driven-Design best practices.

  • Replay the event store to recreate the entire read database.

  • Replay the event store to recreate the entire read database into a different database type - PostgreSQL.

The ultimate goal of this course is to take a deep-dive into the world of CQRS and Event Sourcing to enable you to create microservices that are super decoupled and extremely scalable.

Screenshots

.NET Microservices: CQRS & Event Sourcing with Kafka - Screenshot_01.NET Microservices: CQRS & Event Sourcing with Kafka - Screenshot_02.NET Microservices: CQRS & Event Sourcing with Kafka - Screenshot_03.NET Microservices: CQRS & Event Sourcing with Kafka - Screenshot_04

Reviews

Roberto
October 21, 2023
Single Responsibility principle also applies to diagrams. Look at C4 diagrams to drill in the details from a high level perspective into the individual details for a concept
Adilson
October 10, 2023
The course is really good, the generic implementations are brilliant, CQRS is very well implemented too, but there are some negative points that will be beyond frustrating: 1 - It is now shown how to actually see the events created in kafka, without that the student will have a hard time trying to figure out why things aren't working. 2 - You'll actually run the code only at section 13, which is not a good practice at all, you'll be stranded with a lot of bugs if you don't do exactly as the teacher shows. 3 - The business rules are a little bit too complicated, that's not a really bad negative point, but sometimes you'll be spending a lot of time trying to validate things. Overall it's a really good course, but it's certainly not a beginner-friendly one.
Michael
September 28, 2023
That's a great course but there are still some points that are missing. e.g What about having multiple micro services that needs to handle events from each others as they might need to update their respective read database in order to improve read performances.. I would really like to have recommendations/best practices on how to manage such behaviour.
Will
September 3, 2023
Great content and format. Appreciate the architecture diagram and the introduction of the concepts before each section. The environment setup all worked well. There's a great docker compose yaml file in the Q&A section of the environment setup lessons that makes the process even more seamless. If I were to offer one piece of constructive criticism, I wish there had been a section on recovering from issues in the read replica. What happens when we fail to consume an event due to an intermittent issue? Thanks for a great course! Will keep an eye out for others from this author.
Vladislav
August 3, 2023
I like that all code examples works. But I still have no idea, how should I restructure my project to support more entities (users, groups, messages, ... other elements of social network) In any case I am happy with my purchase.
Tsepo
July 27, 2023
Now this is a quality course. The instructor did a great job of explaining each and every line of code without wasting time. Now I have an in-depth understanding of CQRS, Kafka, and Event Sourcing. The last section on recreating the read DB from the Event Store blew my mind. Thanks again!
Varga
July 24, 2023
No authentication concept in place, how microservices share authentication and authorization? No deployment covered. Generaly the delivery of information is good, but extremely slow, I take this course x1.75 speed while the instructor speech still normal. There are a lot of boilerplates in it, generaly the content not more that 2-3 hours. This course looks partial and not finished. Mandantory parts, information missing. Microservice as a whole not described, sample project is too basic. Overall the mediator patter usage is nice and interesting at all, but not anti-pattern for this? Please finish the course, becouse its near miss right now.
Doruk
July 22, 2023
As a microservices noob, I liked the code along approach, albeit a bit repetitive. Overall quality of content was great. Ending was really powerful as was suggested.
Orajt93
July 5, 2023
The course is good for people that starts with event sourcing. It could be much easier and shorter if teacher use MediatR library. I think that there could be more information about how to ensure that data are consistent between two databases (there are few things that should be concidered like a situation when message broker is unavailable, when there error occures during consuming etc.). Stili its a good course, there are few cool things that i will try to remember and use in my projects.
Hamklien
June 17, 2023
Really like this course, great to learn about microservices with C#, great explain and the way to implement every section was great. Highly recommended.
Patrick
May 22, 2023
Considering that CQRS is not the prefered method of microservices, explanations should be deeper. The instructor seems to read code, and skip important knowledge. Event patterns are hard to figure out, and should be explored with diagrams and drawing before coding.
Santosh
May 3, 2023
The video of instructor coding on IDE is too small to look. Its really tough to keep along. Why can't we zoom in on IDE. I wish to see more courses from Sean on .NET
Juan
April 24, 2023
I absolutely love this course, this instructor - he is top notch! I am so impressed at the simplicity and direction provided in this course. This is by far the best course I have taken on Udemy.
Jonathan
April 17, 2023
Though some parts of the source code won't make sense, the instructor explains the concepts well from a high-level perspective. Since the actual flow of data and events could only be demonstrated with the Controller implementations, I wonder how the implementations work collectively. I know that Unit Test is not part of this course to validate the implementations, but it would help the student understand more why some parts of the source code are written the way it is if the instructor explained the reason behind it.
Shawn
March 20, 2023
Informative on the "how to" but not a lot of the "why". Most of the course was "code along" including creating an in-house Mediatr utility that could have just used the (insanely popular) Mediatr library by Jimmy Bogard. This would've allowed more time focused on the actual topic vs. building utilities that could be brought in via Nuget.

Charts

Price

.NET Microservices: CQRS & Event Sourcing with Kafka - Price chart

Rating

.NET Microservices: CQRS & Event Sourcing with Kafka - Ratings chart

Enrollment distribution

.NET Microservices: CQRS & Event Sourcing with Kafka - Distribution chart
3730502
udemy ID
12/27/2020
course created date
10/25/2022
course indexed date
Bot
course submited by