Skip to main content
CF

.NET Microservices: CQRS & Event Sourcing with Kafka

8h 31m 56s
English
Paid

.NET Microservices: CQRS & Event Sourcing with Kafka is a 91-lesson 8 hours 31 minutes self-paced course by Udemy. This course teaches you how to build .

Course facts

Lessons
91
Duration
8 hours 31 minutes
Level
All levels
Language
English
Updated
Instructor
Udemy
Price
Premium

This course teaches you how to build .NET microservices with CQRS and Event Sourcing. You write the full code yourself. You use C#, MongoDB, SQL Server, and Kafka. You learn each idea step by step so you can use these patterns with confidence.

What You Will Learn

You build each part of the system. You see how commands, events, and data flow work together. You also learn how the read and write paths stay apart.

CQRS and Event Flow

  • Handle commands and raise events.
  • Use the mediator pattern for command and query dispatch.
  • Change aggregate state with event messages.
  • Apply event versioning and track changes over time.
  • Replay events to rebuild an aggregate state.

Data Stores and Persistence

  • Build an event store as the write side in MongoDB.
  • Create the read side in SQL Server.
  • Use optimistic concurrency control.
  • Replay all events to rebuild the full read database.
  • Rebuild the read database in a new type, such as PostgreSQL.

Kafka Integration

  • Produce events to Apache Kafka.
  • Consume Kafka events to update the read database.

Why These Skills Matter

You learn how to keep read and write paths separate. This leads to clean code and clear flow. You also see how event logs help you fix errors and rebuild data.

By the end, you know how to build microservices that scale and stay easy to change.

Who teaches .NET Microservices: CQRS & Event Sourcing with Kafka? Udemy

Udemy thumbnail

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

What lessons are included in .NET Microservices: CQRS & Event Sourcing with Kafka?

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 91 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Microservices Basics
All Course Lessons (91)
#Lesson TitleDurationAccess
1
Microservices Basics Demo
03:52
2
CQRS
02:27
3
Event Sourcing
01:22
4
Architecture Overview
06:50
5
Apache Kafka
01:04
6
Setup & Structure Section Intro
00:27
7
Prerequisites
08:09
8
Run Kafka in Docker
05:39
9
Run MongoDB in Docker
02:34
10
Run Microsoft SQL in Docker.
05:07
11
Basic Project Setup
08:59
12
Adding Project References
10:21
13
Adding NuGet Packages
05:21
14
Setup Debug Configurations (VS Code Only)
02:52
15
What is a Command?
00:55
16
Commands
05:01
17
What is an Event?
00:32
18
Events
08:23
19
The Mediator Pattern
03:11
20
ICommandDispatcher Interface (The Mediator)
02:47
21
CommandDispatcher (The Concrete Mediator)
05:33
22
What is an Aggregate?
02:17
23
AggregateRoot
09:51
24
PostAggregate Part 1
12:27
25
PostAggregate Part 2
08:21
26
What is an Event Store?
01:04
27
EventModel
03:23
28
IEventStoreRepository Interface
02:34
29
EventStoreRepository
09:17
30
IEventStore Interface
01:21
31
EventStore
11:27
32
IEventSourcingHandler Interface
01:43
33
EventSourcingHandler
06:56
34
The Mediator Pattern Continued
00:46
35
ICommandHandler Interface (The Abstract Colleague)
01:55
36
CommandHandler (The Concrete Colleague)
10:07
37
Register Command Handlers
05:09
38
Kafka Producer
03:19
39
EventProducer Interface & Implementation
10:02
40
Producing an Event
05:34
41
Important DDD Concepts
01:26
42
Domain Entities
05:28
43
IPostRepository Interface
03:47
44
ICommentRepository Interface
01:47
45
The Read Database
00:27
46
DatabaseContext
09:34
47
Programmatically Create DB & Tables on Startup
07:44
48
PostRepository
08:27
49
CommentRepository
05:03
50
Event Handling Introduction
00:21
51
IEventHandler Interface
01:43
52
EventHandler
09:43
53
Kafka Consumer
03:40
54
IEventConsumer Interface
00:39
55
EventJsonConverter
07:49
56
EventConsumer
11:58
57
ConsumerHostedService
06:36
58
Command Controllers Intro
00:39
59
Data Transfer Objects
01:25
60
NewPostController
08:30
61
Creating a New Social Media Post
15:05
62
EditMessageController
05:33
63
Edit Message of a Social Media Post
12:09
64
LikePostController
03:25
65
Like a Social Media Post
10:57
66
AddCommentController
03:07
67
Add a Comment to a Social Media Post
11:25
68
EditCommentController
03:20
69
Edit a Comment on a Social Media Post
12:12
70
RemoveCommentController
04:24
71
Delete a Comment from a Social Media Post
11:09
72
DeletePostController
02:57
73
Deleting a Social Media Post
10:21
74
The Mediator Pattern (Query Dispatching)
01:03
75
Social Media Queries
03:37
76
IQueryDispatcher Interface (The Mediator)
03:34
77
QueryDispatcher (The Concrete Mediator)
05:45
78
Query Handling Introduction
00:23
79
IQueryHandler Interface (The Abstract Colleague)
01:45
80
QueryHandler (The Concrete Colleague)
04:29
81
Register Query Handlers
04:25
82
Query Controller Intro
00:18
83
Data Transfer Objects
01:14
84
PostLookupController Part 1
09:59
85
PostLookupController Part 2
09:00
86
Testing the PostLookupController
16:49
87
Powerful Ending Intro
00:41
88
Create Functionality to Restore the Read Database
12:28
89
Restore the Entire Read Database
20:06
90
Rapidly Change the Read Database Type
14:06
91
Congratulations
00:25
Unlock unlimited learning

Get instant access to all 90 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

What courses are similar to .NET Microservices: CQRS & Event Sourcing with Kafka?

Frequently asked questions

What are the prerequisites for this course?
The course assumes familiarity with C# and basic understanding of microservices architecture. Prior experience with tools like Docker, MongoDB, SQL Server, and Apache Kafka would be beneficial, but step-by-step guidance is provided for running these services in Docker.
What kind of projects will I build during the course?
Students build a complete microservices system using CQRS and Event Sourcing patterns. The project involves setting up an event store in MongoDB, a read database in SQL Server, and integrating event production and consumption with Apache Kafka. The course also includes practical implementation of commands, events, and aggregates.
Who is the target audience for this course?
The course is designed for software developers and architects interested in building scalable, maintainable microservices using .NET. It's suitable for those who want to implement CQRS and Event Sourcing patterns and leverage Kafka for event-driven architectures.
How does the depth of this course compare to other similar courses?
This course provides a detailed exploration of CQRS and Event Sourcing with practical implementation in .NET. It covers the complete lifecycle of microservices development, from setting up infrastructure with Docker to handling events with Kafka. The focus on real-world implementation distinguishes it from more theoretical or introductory courses.
What specific tools or platforms will I use in this course?
The course uses C# for coding and integrates Docker to run MongoDB, SQL Server, and Apache Kafka. You will also use Visual Studio Code for setting up and debugging configurations and manage dependencies through NuGet Packages.
What topics are not covered in this course?
The course does not cover front-end development or user interface design. It focuses solely on back-end architecture, particularly around CQRS, Event Sourcing, and Kafka for microservices. Advanced topics like security and deployment to cloud platforms are also not included.
How much time should I expect to commit to this course?
The course consists of 91 lessons. While the total runtime isn't specified, students should expect to spend additional time on practical exercises and coding projects, which are integral to understanding the material. Allocating several hours per week is advisable for completion.