EventDriven Microservices CQRS SAGA Axon Spring Boot

Learn to build distributed Event-driven Microservices, CQRS, Event Sourcing, SAGA and Transactions.
EventDriven Microservices CQRS SAGA Axon Spring Boot
File Size :
3.19 GB
Total length :
9h 6m

Category

Instructor

Sergey Kargopolov

Language

Last update

5/2023

Ratings

4.5/5

EventDriven Microservices CQRS SAGA Axon Spring Boot

What you’ll learn

Create Event-Driven Microservices
Basics of Spring Cloud
Use Axon Framework
Use Eureka Discovery Service
Implement CQRS Design Pattern
Use Spring Cloud API Gateway
Implement SAGA Design Pattern
Create Event Based Messages
Rollback Transactions

EventDriven Microservices CQRS SAGA Axon Spring Boot

Requirements

Java

Description

In this video course, you will learn how to build business logic that spans several distributed Spring Boot Microservices.  This course is designed for beginners and we will start from the basics of Microservices, Spring Boot, and Spring Cloud. You will learn how to create your very first Spring Boot Microservice and how to handle HTTP requests. You will then learn how to run multiple instances of your Microservice behind an API Gateway and how to make them discoverable. This will help you scale up your microservice up and down as needed. This video course will also cover transactions across multiple distributed Microservices and how to roll back changes if an error took place. Transactions is an advanced topic and to be able to build transactional microservices this video course will teach you a few more design patterns. Starting from the very beginning, you will learn how to develop event-based Microservices that are absolutely location transparent. You will learn how to use a modern and very popular framework for building event-based Microservices called Axon. Axon Framework is based on design principles such as CQRS(Command Query Responsibility Segregation) and DDD(Domain Driven Design). You will learn how to build event-based Microservices using Axon Framework and how to use CQRS and Event Sourcing in your Microservices. Finally, you will learn about the Saga design pattern and how to group multiple operations into a single transaction. This will help you build business logic that spans multiple distributed Microservices and roll back changes if one operation fails. All from the very beginning, to make these advanced topics easier.

Overview

Section 1: Introduction

Lecture 1 Introduction

Lecture 2 Source code

Lecture 3 Microservice vs Monolithic application

Lecture 4 Microservices Architecture Overview

Lecture 5 Event-Driven Microservices

Lecture 6 Transactions in Microservices

Lecture 7 Choreography-Based Saga

Lecture 8 Orchestration-Based Saga

Lecture 9 Frameworks that we can use

Lecture 10 (CQRS)Command Query Responsibility Segregation

Lecture 11 Event Sourcing

Lecture 12 Axon Framework and Axon Server

Lecture 13 What if I have questions?

Section 2: Software

Lecture 14 Introduction

Lecture 15 Download and run Docker Desktop

Lecture 16 Spring Tool Suite

Lecture 17 Download and Install Postman HTTP client

Section 3: Creating a Basic Microservice

Lecture 18 Introduction

Lecture 19 Creating a new project. Products Microservice.

Lecture 20 Creating a Rest Controller class

Lecture 21 Handle HTTP POST, GET, PUT and DELETE Requests

Lecture 22 Trying how it works

Section 4: Eureka Discovery

Lecture 23 Introduction

Lecture 24 Creating new project

Lecture 25 Configure project as Eureka Server

Lecture 26 Registering Microservices with Eureka

Lecture 27 Trying how it works

Section 5: Spring Cloud API Gateway & Load Balancing

Lecture 28 Introduction

Lecture 29 Creating Spring Cloud API Gateway project

Lecture 30 Automatic Routing with Resource Locator

Lecture 31 Random Port Number

Lecture 32 Starting Multiple instances of Products Microservice

Lecture 33 Trying how load balancing work

Section 6: Axon Server – Getting Started

Lecture 34 Introduction

Lecture 35 Download and run Axon Server as JAR application

Lecture 36 Axon Server configuration properties

Lecture 37 A complete list of Axon Server configuration properties

Lecture 38 Run Axon Server in a Docker container

Lecture 39 Running Axon Server in Docker Blog Post

Lecture 40 Start, Stop, Delete Axon Server Docker Container By ID

Lecture 41 Configure Axon Server running in Docker Container

Section 7: CQRS Pattern. Products Microservice.

Lecture 42 Introduction

Lecture 43 Accept HTTP Request Body

Lecture 44 Trying how it works

Lecture 45 Adding Axon Framework Spring Boot Starter

Lecture 46 Upgrading Axon Framework to 4.7.0

Lecture 47 Creating a new Command class

Lecture 48 Creating a new CreateProductCommand object

Lecture 49 Send Command to a Command Gateway

Lecture 50 Product Aggregate – Introduction

Lecture 51 Creating ProductAggregate class

Lecture 52 Validate the CreateProductCommand

Lecture 53 Creating ProductCreatedEvent

Lecture 54 Apply and Publish the Product Created Event

Lecture 55 @EventSourcingHandler

Lecture 56 Adding Additional Dependency

Lecture 57 Trying how it works

Lecture 58 Previewing Event in the EventStore

Section 8: CQRS. Persisting Event in the Products database.

Lecture 59 Introduction

Lecture 60 Adding Spring Data JPA & H2 dependencies

Lecture 61 Configure database access in the application.properties file

Lecture 62 Creating an ProductEntity

Lecture 63 Creating ProductRepository

Lecture 64 Creating Products Events Handler/Projection

Lecture 65 Implementing @EventHandler method

Lecture 66 Trying how it works

Lecture 67 Preview Product record in a database

Section 9: CQRS. Querying Data

Lecture 68 Introduction

Lecture 69 Creating Rest Controller

Lecture 70 Refactor Command API Rest Controller

Lecture 71 Get Products web service endpoint

Lecture 72 Querying the QueryGateway

Lecture 73 Creating ProductsQueryHandler

Lecture 74 Implementing the findProducts() method

Lecture 75 Trying how it works

Section 10: Validating Request Body. Bean Validation.

Lecture 76 Introduction to Bean Validation

Lecture 77 Bean validation. Enable Bean Validation.

Lecture 78 Bean validation. Validating Request Body.

Lecture 79 Hibernate Validator Documentation

Lecture 80 Trying how the Request Body Validation works.

Section 11: Validation in the @CommandHandler method

Lecture 81 Introduction

Lecture 82 Command validation in the Aggregate

Section 12: Validation. Message Dispatch Interceptor.

Lecture 83 Introduction to Message Dispatch Interceptor

Lecture 84 Creating a new Command Interceptor class

Lecture 85 Register Message Dispatch Interceptor

Lecture 86 Trying how the Command Interceptor works.

Section 13: Validation. How to check if record exists?

Lecture 87 Set Based Consistency – Introduction

Lecture 88 Creating Product Lookup Entity

Lecture 89 Creating Product Lookup Repository

Lecture 90 Creating a ProductLookupEventsHandler

Lecture 91 Persisting information into a ProductLookup table

Lecture 92 Updating MessageDispatchInterceptor

Lecture 93 Trying how the Set base validation works

Section 14: Handle Error & Rollback Transaction

Lecture 94 Introduction

Lecture 95 Creating a centralized Error Handler class

Lecture 96 Trying how the centralized error handler class works

Lecture 97 Return custom error object

Lecture 98 Handle the @CommandExecutionException

Lecture 99 Trying to handle the @CommandExecutionException

Lecture 100 @ExceptionHandler

Lecture 101 Creating the ListenerInvocationErrorHandler

Lecture 102 Register the ListenerInvocationErrorHandler

Lecture 103 Trying how transaction rollback works

Section 15: Assignment. Orders Microservice.

Lecture 104 Assignment

Lecture 105 Solution

Section 16: Orchestration-based Saga. Part 1. Reserve Product in Stock.

Lecture 106 Introduction

Lecture 107 Saga class structure overview

Lecture 108 Creating OrderSaga class

Lecture 109 @SagaEventHandler method for the OrderCreatedEvent

Lecture 110 Creating a new Core API module

Lecture 111 Adding Core project as a dependency to OrdersService

Lecture 112 Creating the ReserveProductCommand

Lecture 113 Publish the ReserveProductCommand

Lecture 114 Handle the ProductServeCommand in the ProductsService

Lecture 115 Publish the ProductReservedEvent

Lecture 116 Updating Products projection

Lecture 117 Handle the ProductReservedEvent in Saga

Lecture 118 Trying how it works

Section 17: Saga. Part 2. Fetch Payment Details.

Lecture 119 Introduction

Lecture 120 Assignment

Lecture 121 Solution

Lecture 122 Fetching User Payment Details

Lecture 123 Trying how it works

Section 18: Saga. Part 3. Process User Payment.

Lecture 124 Creating the ProcessPaymentCommand

Lecture 125 Publish the ProcessPaymentCommand

Lecture 126 Assignment

Lecture 127 Solution

Lecture 128 Handle the PaymentProcessedEvent

Section 19: SAGA. Part 3. Approve Order.

Lecture 129 Create and publish the ApproveOrderCommand

Lecture 130 Handle the ApproveOrderCommand

Lecture 131 Create and publish the OrderApprovedEvent

Lecture 132 Handle the OrderApprovedEvent and update Orders database

Lecture 133 Handle the OrderApprovedEvent in OrderSaga class

Lecture 134 Trying how it works

Section 20: SAGA. Compensating Transactions.

Lecture 135 Introduction

Lecture 136 Creating the CancelProductReservation command

Lecture 137 Publish the CancelProductReservationCommand

Lecture 138 Handle the CancelProductReservation command in ProductsService

Lecture 139 Create and publish the ProductReservationCancelledEvent

Lecture 140 Handle the ProductReservationCancelledEvent

Lecture 141 Create and publish the RejectOrderCommand

Lecture 142 Handle the RejectOrderCommand on the query side

Lecture 143 Create, publish and handle the OrderRejectedEvent

Lecture 144 Trying how it works

Section 21: Deadlines

Lecture 145 Introduction

Lecture 146 Creating a DeadlineManager object

Lecture 147 Schedule a deadline

Lecture 148 Handle deadline

Lecture 149 Cancel deadline

Lecture 150 Trying how it works

Section 22: Subscription Queries

Lecture 151 Introduction

Lecture 152 Creating the FindOrderQuery

Lecture 153 Creating the QueryHandler method

Lecture 154 Sending a Subscription Query

Lecture 155 Emit an Update to the subscription query

Lecture 156 Trying how it works

Section 23: Snapshotting

Lecture 157 Introduction

Lecture 158 Configure Snapshotting

Lecture 159 Trying how it works

Section 24: Events Replay

Lecture 160 Introduction

Lecture 161 @ResetHandler

Lecture 162 Replay Events Endpoint

Lecture 163 Starting the Replay of Events

Lecture 164 Trying how it works

Section 25: What’s next?

Lecture 165 Bonus lecture

Beginner Java developers interested in learning about Microservices

Course Information:

Udemy | English | 9h 6m | 3.19 GB
Created by: Sergey Kargopolov

You Can See More Courses in the Developer >> Greetings from CourseDown.com

New Courses

Scroll to Top