Skip to main content
CF

Microservices: Clean Architecture, DDD, SAGA, Outbox & Kafka

18h 2m 34s
English
Paid

Hi there! My name is Ali Gelenler. I'm here to help you learn microservices architecture while applying Clean and Hexagonal Architectures and using Domain Driven Design. In this course, you will focus on architectural aspects of microservices architecture and use Clean Architecture principles while developing each service. In the implementation of the domain layer you will also apply Domain Driven Design principles.

You can always use the latest versions for spring boot, and other dependencies in this course. I will be constantly updating the dependency version in the last section's lectures. You may check that to see the required code and configuration changes for updated versions. Also if you would like to use subtitles during the course, you can turn on the captions on videos as all lectures are updated with hand-written subtitles by choosing among over 20 different languages. I suggest using subtitles to make it easier to follow the lectures.

You will implement SAGA, Outbox and CQRS patterns using the 5 Spring boot Java microservices that you will develop using Clean and Hexagonal architecture principles.

You will also learn and use Apache Kafka as the event store, and use events to communicate between services, and to implement the architectural patterns.

The concepts that you will be learning and implementing are:

  • Spring boot microservices

  • Clean Architecture

  • Hexagonal Architecture

  • Domain Driven Design

  • Event-driven services using Apache Kafka

  • SAGA Architecture Pattern

  • Outbox Architecture Pattern

  • CQRS Architecture Pattern

  • Kubernetes on local using Docker desktop

  • Kubernetes on Google Cloud using Google Kubernetes Engine(GKE)

To communicate with the data stores in microservices you will use Spring Data JPA for PostgreSQL, and Spring Kafka for Kafka.

You will be following a hands-on approach and  developing a project from scratch. You will have 5 microservices that communicate using events with Kafka as the event store.

You will also have multiple choice quizzes in each section to check your progress throughout the course.

At the end of the course you will understand how to run an event-driven microservices architecture with Clean and Hexagonal Architecture principles and with Domain Driven Design concepts. You will use Spring boot and Java to develop the microservices. You will also learn implementing architectural microservices patterns such as SAGA, Outbox and CQRS. In the end you will be able to deploy your application to Kubernetes on Google Cloud using Google Kubernetes Engine.

About the Author: 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.

Watch Online 107 lessons

This is a demo lesson (10:00 remaining)

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

View Pricing
0:00
/
#1: Structure of the course
All Course Lessons (107)
#Lesson TitleDurationAccess
1
Structure of the course Demo
14:19
2
Project overview - Part 1
12:45
3
Project overview - Part 2
10:42
4
Setting up the environment
05:53
5
Introduction to Clean and Hexagonal Architectures
15:55
6
Designing components for Order Service using Clean Architecture
11:43
7
Creating Order Service modules using Clean Architecture - PART 1
12:07
8
Creating Order Service modules using Clean Architecture - PART 2
07:58
9
Introduction to Domain Driven Design
12:36
10
Designing Order Service domain logic components
12:15
11
Creating common domain module with base Entity and Aggregate Root classes
05:20
12
Adding value objects and domain events to common domain module
13:27
13
Implementing Order Service domain logic using DDD - Order Aggregate Root
16:01
14
Adding Order Entity implementation methods
11:30
15
Adding state changing methods to Order Entity
10:06
16
Implemeting Domain Events in Order Service domain layer
09:21
17
Implementing Order Domain Service
12:34
18
Implementing Order Application Service - DTO classes
12:28
19
Adding Mapper class and port definitions to Order Application Service
12:37
20
Implementing input ports in Order Application Service
21:37
21
Implementing message publisher in Order Application Service to fire the events
12:39
22
Implementing Order Track Command Handler
06:15
23
Testing Order Service domain logic - Part 1
13:55
24
Testing Order Service domain logic - Part 2
07:28
25
Introduction to Apache Kafka
06:19
26
Running Apache Kafka using Docker
12:58
27
Implementing Kafka config data generic module
08:42
28
Implementing Kafka model generic module
07:01
29
Implementing Kafka producer generic module
08:27
30
Implementing Kafka consumer generic module
05:17
31
Application module: Adding Web Controller
06:20
32
Application module: Adding Controller Advice
11:00
33
Data access module: Adding Order JPA Entity
10:46
34
Data access module: Adding JPA Repository & Adapter implementation
12:04
35
Data access module: Adding Customer and Restaurant implementations
13:27
36
Messaging module: Adding Mapper and Config Data
06:20
37
Messaging module: Adding Publisher implementations
14:32
38
Messaging module: Adding Listener implementations
11:37
39
Container module: Adding spring boot starter class and config
13:50
40
Container module: Explaining kafka consumer properties
09:08
41
Container module: Adding Order database schema file
05:22
42
Creating Customer Service & Running Order Service
10:33
43
Domain core module: Adding Aggregate Root, Entity and Value objects
12:28
44
Domain core module: Adding Exception and Domain events
02:48
45
Domain core module: Implementing Payment Domain Service
12:44
46
Application Service domain module: Adding Mapper, Config and Ports
10:38
47
Application Service domain module: Implementing input ports - Part 1
10:52
48
Application Service domain module: Implementing input ports - Part 2
02:47
49
Application Service domain module: Refactoring fire event process
12:23
50
Implementing Data Access module
12:28
51
Implementing Messaging module: Adding Mapper and Publishers
11:37
52
Implementing Messaging module: Adding Listeners
05:08
53
Implementing Container module
11:11
54
Domain core module: Adding Aggregate Root and Entities
12:44
55
Domain core module: Adding Exception, Domain events and Domain Service
07:14
56
Application Service domain module: Adding Mapper, DTO and Ports
08:44
57
Application Service domain module: Implementing input ports
09:43
58
Implementing Data Access module
11:33
59
Implementing Messaging module
09:06
60
Implementing Container module
10:39
61
Introduction to SAGA pattern
02:54
62
Implementing Order Payment Saga
13:03
63
Using Order Payment Saga in Messaging & Implementing Order Approval Saga
09:31
64
Testing the application end-to-end with SAGA pattern changes
11:01
65
Testing failure scenarios
09:00
66
Introduction to Outbox pattern
03:57
67
Updating Order Service database schema and config for Outbox Pattern
07:35
68
Refactoring Order domain layer: Adding Outbox models & Updating ports
15:09
69
Refactoring Order domain layer: Adding Outbox scheduler
16:55
70
Refactoring Order domain layer: Adding Outbox cleaner scheduler for Payment
04:19
71
Refactoring Order domain layer: Adding Outbox schedulers for Approval
11:04
72
Refactoring Order domain layer: Updating OrderCreate Command Handler
10:29
73
Refactoring Order domain layer: Updating Order Payment Saga - Part 1
18:32
74
Refactoring Order domain layer: Updating Order Payment Saga - Part 2
14:23
75
Refactoring Order domain layer: Updating Order Approval Saga
12:33
76
Updating the Order Application Service Test for Outbox pattern changes
04:15
77
Refactoring Order Data Access module for Outbox pattern
09:28
78
Refactoring Order Messaging module for Outbox pattern - Part 1
10:15
79
Refactoring Order Messaging module for Outbox pattern - Part 2
10:56
80
Testing Order Payment Saga
13:37
81
Updating Payment database schema, config and package structure for Outbox
07:14
82
Refactoring Payment domain layer: Adding Outbox schedulers
16:00
83
Refactoring Payment domain layer: Updating Message listener implementation
08:11
84
Refactoring Payment Data Access module for Outbox pattern
06:22
85
Refactoring Payment Messaging module for Outbox pattern
09:51
86
Testing Payment Request Message Listener for double payment
09:41
87
Refactoring Restaurant Service for Outbox pattern - Part 1
13:58
88
Refactoring Restaurant Service for Outbox pattern - Part 2
05:48
89
Testing the application end-to-end with Outbox pattern changes
14:51
90
Testing failure scenarios
04:19
91
Introduction to CQRS pattern
02:33
92
Creating Customer Kafka topic & Customer modules
14:34
93
Implementing Customer Service modules
14:48
94
Updating Order Service to use local database table with CQRS pattern
10:22
95
Running Order and Customer Services to test CQRS pattern
06:39
96
Introduction to Kubernetes and running a local Kubernetes using Docker Desktop
05:57
97
Deploying Confluent Kafka to local Kubernetes using cp-helm-charts
11:55
98
Creating Kubernetes deployment files for Microservices
11:28
99
Deploying Microservices into local Kubernetes
09:31
100
Deploying Postgres to local Kubernetes using Postgres docker image
05:12
101
Creating Google Cloud account & Creating a Kubernetes cluster in GKE
07:47
102
Pushing docker images to Google Artifact Registry
10:02
103
Running the Application on Google Kubernetes Engine - Part 1
08:43
104
Running the Application on Google Kubernetes Engine - Part 2
07:56
105
Adding horizontal scaling to services
08:51
106
Next steps & Thank you!
01:19
107
Update to spring boot 2.7.5
09:45
Unlock unlimited learning

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

Learn more about subscription

Course content

107 lessons · 18h 2m 34s
Show all 107 lessons
  1. 1 Structure of the course 14:19
  2. 2 Project overview - Part 1 12:45
  3. 3 Project overview - Part 2 10:42
  4. 4 Setting up the environment 05:53
  5. 5 Introduction to Clean and Hexagonal Architectures 15:55
  6. 6 Designing components for Order Service using Clean Architecture 11:43
  7. 7 Creating Order Service modules using Clean Architecture - PART 1 12:07
  8. 8 Creating Order Service modules using Clean Architecture - PART 2 07:58
  9. 9 Introduction to Domain Driven Design 12:36
  10. 10 Designing Order Service domain logic components 12:15
  11. 11 Creating common domain module with base Entity and Aggregate Root classes 05:20
  12. 12 Adding value objects and domain events to common domain module 13:27
  13. 13 Implementing Order Service domain logic using DDD - Order Aggregate Root 16:01
  14. 14 Adding Order Entity implementation methods 11:30
  15. 15 Adding state changing methods to Order Entity 10:06
  16. 16 Implemeting Domain Events in Order Service domain layer 09:21
  17. 17 Implementing Order Domain Service 12:34
  18. 18 Implementing Order Application Service - DTO classes 12:28
  19. 19 Adding Mapper class and port definitions to Order Application Service 12:37
  20. 20 Implementing input ports in Order Application Service 21:37
  21. 21 Implementing message publisher in Order Application Service to fire the events 12:39
  22. 22 Implementing Order Track Command Handler 06:15
  23. 23 Testing Order Service domain logic - Part 1 13:55
  24. 24 Testing Order Service domain logic - Part 2 07:28
  25. 25 Introduction to Apache Kafka 06:19
  26. 26 Running Apache Kafka using Docker 12:58
  27. 27 Implementing Kafka config data generic module 08:42
  28. 28 Implementing Kafka model generic module 07:01
  29. 29 Implementing Kafka producer generic module 08:27
  30. 30 Implementing Kafka consumer generic module 05:17
  31. 31 Application module: Adding Web Controller 06:20
  32. 32 Application module: Adding Controller Advice 11:00
  33. 33 Data access module: Adding Order JPA Entity 10:46
  34. 34 Data access module: Adding JPA Repository & Adapter implementation 12:04
  35. 35 Data access module: Adding Customer and Restaurant implementations 13:27
  36. 36 Messaging module: Adding Mapper and Config Data 06:20
  37. 37 Messaging module: Adding Publisher implementations 14:32
  38. 38 Messaging module: Adding Listener implementations 11:37
  39. 39 Container module: Adding spring boot starter class and config 13:50
  40. 40 Container module: Explaining kafka consumer properties 09:08
  41. 41 Container module: Adding Order database schema file 05:22
  42. 42 Creating Customer Service & Running Order Service 10:33
  43. 43 Domain core module: Adding Aggregate Root, Entity and Value objects 12:28
  44. 44 Domain core module: Adding Exception and Domain events 02:48
  45. 45 Domain core module: Implementing Payment Domain Service 12:44
  46. 46 Application Service domain module: Adding Mapper, Config and Ports 10:38
  47. 47 Application Service domain module: Implementing input ports - Part 1 10:52
  48. 48 Application Service domain module: Implementing input ports - Part 2 02:47
  49. 49 Application Service domain module: Refactoring fire event process 12:23
  50. 50 Implementing Data Access module 12:28
  51. 51 Implementing Messaging module: Adding Mapper and Publishers 11:37
  52. 52 Implementing Messaging module: Adding Listeners 05:08
  53. 53 Implementing Container module 11:11
  54. 54 Domain core module: Adding Aggregate Root and Entities 12:44
  55. 55 Domain core module: Adding Exception, Domain events and Domain Service 07:14
  56. 56 Application Service domain module: Adding Mapper, DTO and Ports 08:44
  57. 57 Application Service domain module: Implementing input ports 09:43
  58. 58 Implementing Data Access module 11:33
  59. 59 Implementing Messaging module 09:06
  60. 60 Implementing Container module 10:39
  61. 61 Introduction to SAGA pattern 02:54
  62. 62 Implementing Order Payment Saga 13:03
  63. 63 Using Order Payment Saga in Messaging & Implementing Order Approval Saga 09:31
  64. 64 Testing the application end-to-end with SAGA pattern changes 11:01
  65. 65 Testing failure scenarios 09:00
  66. 66 Introduction to Outbox pattern 03:57
  67. 67 Updating Order Service database schema and config for Outbox Pattern 07:35
  68. 68 Refactoring Order domain layer: Adding Outbox models & Updating ports 15:09
  69. 69 Refactoring Order domain layer: Adding Outbox scheduler 16:55
  70. 70 Refactoring Order domain layer: Adding Outbox cleaner scheduler for Payment 04:19
  71. 71 Refactoring Order domain layer: Adding Outbox schedulers for Approval 11:04
  72. 72 Refactoring Order domain layer: Updating OrderCreate Command Handler 10:29
  73. 73 Refactoring Order domain layer: Updating Order Payment Saga - Part 1 18:32
  74. 74 Refactoring Order domain layer: Updating Order Payment Saga - Part 2 14:23
  75. 75 Refactoring Order domain layer: Updating Order Approval Saga 12:33
  76. 76 Updating the Order Application Service Test for Outbox pattern changes 04:15
  77. 77 Refactoring Order Data Access module for Outbox pattern 09:28
  78. 78 Refactoring Order Messaging module for Outbox pattern - Part 1 10:15
  79. 79 Refactoring Order Messaging module for Outbox pattern - Part 2 10:56
  80. 80 Testing Order Payment Saga 13:37
  81. 81 Updating Payment database schema, config and package structure for Outbox 07:14
  82. 82 Refactoring Payment domain layer: Adding Outbox schedulers 16:00
  83. 83 Refactoring Payment domain layer: Updating Message listener implementation 08:11
  84. 84 Refactoring Payment Data Access module for Outbox pattern 06:22
  85. 85 Refactoring Payment Messaging module for Outbox pattern 09:51
  86. 86 Testing Payment Request Message Listener for double payment 09:41
  87. 87 Refactoring Restaurant Service for Outbox pattern - Part 1 13:58
  88. 88 Refactoring Restaurant Service for Outbox pattern - Part 2 05:48
  89. 89 Testing the application end-to-end with Outbox pattern changes 14:51
  90. 90 Testing failure scenarios 04:19
  91. 91 Introduction to CQRS pattern 02:33
  92. 92 Creating Customer Kafka topic & Customer modules 14:34
  93. 93 Implementing Customer Service modules 14:48
  94. 94 Updating Order Service to use local database table with CQRS pattern 10:22
  95. 95 Running Order and Customer Services to test CQRS pattern 06:39
  96. 96 Introduction to Kubernetes and running a local Kubernetes using Docker Desktop 05:57
  97. 97 Deploying Confluent Kafka to local Kubernetes using cp-helm-charts 11:55
  98. 98 Creating Kubernetes deployment files for Microservices 11:28
  99. 99 Deploying Microservices into local Kubernetes 09:31
  100. 100 Deploying Postgres to local Kubernetes using Postgres docker image 05:12
  101. 101 Creating Google Cloud account & Creating a Kubernetes cluster in GKE 07:47
  102. 102 Pushing docker images to Google Artifact Registry 10:02
  103. 103 Running the Application on Google Kubernetes Engine - Part 1 08:43
  104. 104 Running the Application on Google Kubernetes Engine - Part 2 07:56
  105. 105 Adding horizontal scaling to services 08:51
  106. 106 Next steps & Thank you! 01:19
  107. 107 Update to spring boot 2.7.5 09:45

Related courses

Frequently asked questions

What is Microservices: Clean Architecture, DDD, SAGA, Outbox & Kafka about?
Hi there! My name is Ali Gelenler. I'm here to help you learn microservices architecture while applying Clean and Hexagonal Architectures and using Domain Driven Design. In this course, you will focus on architectural aspects of…
Who teaches Microservices: Clean Architecture, DDD, SAGA, Outbox & Kafka?
Microservices: Clean Architecture, DDD, SAGA, Outbox & Kafka is taught by Udemy. You can find more courses by this instructor on the corresponding source page.
How long is Microservices: Clean Architecture, DDD, SAGA, Outbox & Kafka?
Microservices: Clean Architecture, DDD, SAGA, Outbox & Kafka contains 107 lessons with a total runtime of 18 hours 2 minutes. All lessons are available to watch online at your own pace.
Is Microservices: Clean Architecture, DDD, SAGA, Outbox & Kafka free to watch?
Microservices: Clean Architecture, DDD, SAGA, Outbox & Kafka is part of CourseFlix's premium catalog. A CourseFlix subscription unlocks the full video player; the course description, table of contents, and preview information are available to everyone.
Where can I watch Microservices: Clean Architecture, DDD, SAGA, Outbox & Kafka online?
Microservices: Clean Architecture, DDD, SAGA, Outbox & Kafka is available to watch online on CourseFlix at https://courseflix.net/course/microservices-clean-architecture-ddd-saga-outbox-kafka. The page hosts every lesson with the integrated video player; no download is required.