
Students are introduced to the lecturer and told about everything that they will learn in the Java Microservices: CQRS & Event Sourcing with Kafka course.
Students will learn the basics about microservices and best practices that should be followed.
This lecture will provide students with a clear understanding of CQRS and Event Sourcing.
Students will be provided with an architectural overview of the microservices that they are going to create.
Students will be introduced to Apache Kafka.
This video provides an introduction to the Setup & Structure section.
This lecture details all the prerequisites that should be installed before we can start to create our microservices.
Students will learn how to run Apache Kafka in Docker, using Docker Compose.
Students will learn how to run MongoDB in Docker.
Students will learn how to run MySQL in Docker.
This lecture introduces students to the Spring Initializr and how it can be used to generate a Spring Boot application with all of its required dependencies.
Students will learn how to do the basic project setup for their microservices.
In this lecture students will add the account command API application settings.
In this lecture students will add the account Query API application settings.
Students will learn what a command message is, and what it is used for.
In this lecture students will create all the bank account command objects.
Students will learn what an event message is, and what it is used for.
In this lecture students will create all the bank account event objects.
Students will learn how the mediator pattern can be used to implement the Command dispatching mechanism in a CQRS based application.
Students will create the CommandDispatcher interface.
Students are going to implement the AccountCommandDispatcher class, which will dispatch a given command to its relevant command handler method.
Students will be provided with a definition of an aggregate.
Students are going to create the AggregateRoot class, which is the entity within the AccountAggregate, that is responsible for keeping it in a consistent state.
Students are going to implement the AccountAggregate.
Students will be provided with a definition of an Event Store, and be presented with key aspects that need to be considered when creating an event store.
Students are going to create the EventModel that represents the schema of the event records / documents that will be stored to the event store.
Students are going to implement the EventStoreRepository which will provide an interface abstraction for interacting with the event store / write database.
Students will create the EventStore interface, which is an interface abstraction for accessing the event store business logic.
Students are going to implement the AccountEventStore.
Students are going to implement the AccountEventSourcingHandler.
Students are presented with a UML class diagram again, to illustrate that the CommandHandler interface and implementation, as the abstract and concrete colleagues, are the last parts that need to be developed to complete the mediator pattern for the command dispatching mechanism of the CQRS architecture.
Students will create the CommandHandler interface.
Students are going to implement the AccountCommandHandler class.
Students are going to register all the command handlers.
Students will be introduced to important Kafka concepts by means of Kafka architecture diagrams.
Students are going to create the EventProducer interface and implement the AccountEventProducer, through which they will produce the bank account event message to Kafka.
Students will learn how to produce an event from the AccountEventStore once an event has been successfully persisted to the Event Store.
In this lecture, students will be introduced to a few key Domain-Driven Design concepts to ensure that they understand how to implement the domain-layer correctly.
Students are going to learn what a JPA entity is, and they will create a BankAccount entity that will represent the bank_account table in MySQL.
Students are going to implement the AccountRepository, which is based on the repository pattern, to interact with the bank account read database.
This video provides an introduction to the event handling section.
Students are going to learn how to create an EventHandler interface.
Students will implement the AccountEventHandler to handle the bank account events.
In this course you will learn how to create Spring Boot microservices that comply to 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 Java 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 MySQL.
Apply event versioning.
Implement optimistic concurrency control.
Produce events to Apache Kafka.
Consume events from Apache Kafka to populate and alter 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.