Mô tả

In this video course, you will learn how to use Apache Kafka to build Event-Driven Spring Boot Microservices.

This course is designed for beginners and will start from the basics of Microservices and Apache Kafka.

You will learn: 

- What is Apache Kafka, and how to work with it using Command Line Interface(CLI),

You will learn how to use Kafka CLI to : 

- Start multiple Apache Kafka servers in a cluster,

- Work with Kafka Topics,

- Work with Kafka Producer to produce messages,

- Work with Kafka Consumer to consume messages.

You will learn how to create a basic Spring Boot Microservice that acts as a Kafka Producer. While working with this Microservice you will learn: 

- How to send Kafka messages synchronously,

- How to send Kafka messages asynchronously,

- How to work with Acknowledgements, Retries, Delivery and Request timeouts.

You will also learn how to create Kafka Consumer Spring Boot Microservice. While creating Consumer Microservice you will learn to: 

- Consume messages from Kafka topic,

- Handle and recover from errors,

- Work with Kafka Dead Letter Topic(DLT),

- Configure multiple consumer microservices to work as a group(Consumer Groups).

All from the very beginning, to help you learn how to create Event-Driven Microservices with Apache Kafka and Spring Boot.


Bạn sẽ học được gì

Apache Kafka for Microservices

Create Event-Driven Microservices

Work with Kafka CLI

Run Multiple Kafka Servers in a cluster

Work with Kafka Consumers in Java

Work with Kafka Producers in Java

Handle and recover from errors

Yêu cầu

  • Basic knowledge of Java
  • Basic knowledge of Spring Boot

Nội dung khoá học

21 sections

Introduction to Apache Kafka

11 lectures
Introduction
02:37
What is Microservice?
02:55
Microservice vs Monolithic application
03:20
Microservices Communication
06:04
Event-Driven Architecture with Apache Kafka
05:04
Apache Kafka for Microservices
07:47
Apache Kafka for Microservices Quiz
5 questions
Messages and Events in Apache Kafka
05:23
Kafka Topic and Partitions
06:14
Ordering of Events in Apache Kafka
05:37
Quiz: Kafka Topics, Partitions and Messages
5 questions

Apache Kafka Broker(s)

10 lectures
What is Apache Kafka broker?
02:31
Apache Kafka broker: Leader and Follower roles. Leadership balance.
04:45
Quiz: Kafka Broker
6 questions
Download Apache Kafka(MacOS)
04:24
Run Apache Kafka on Windows or in Docker
00:12
Start single Apache Kafka broker with KRaft
06:20
Multiple Kafka broker: Configuration Files
11:42
Multiple Kafka broker: Storage folders
03:20
Starting multiple Kafka broker with KRaft
02:33
Stopping Apache Kafka brokers
03:59

Kafka CLI: Topics

5 lectures
Introduction to Kafka Topic CLI
01:30
Creating a new Kafka topic
07:47
List and describe Kafka topics
03:04
Deleting a Topic
02:01
Apache Kafka Topic: Summary PDF document.
00:06

Kafka CLI: Producers

4 lectures
Introduction Kafka Producer CLI
01:21
Producing a Message without a Key
04:29
Send message as a Key:Value Pair
02:52
Apache Kafka CLI: Producer. Summary PDF document
00:06

Kafka CLI: Consumers

6 lectures
Introduction to Kafka Consumer CLI
01:16
Consuming messages from Kafka topic from the beginning
05:07
Consuming new messages only
02:00
Consuming Key:Value pair messages from Kafka topic
06:12
Consuming messages in order
05:43
Apache Kafka CLI: Consumer. Summary PDF document
00:06

Kafka Producer - Spring Boot Microservice

18 lectures
Source code
00:04
Introduction to Kafka Producer
02:44
Kafka Producer - Introduction to synchronous communication style
04:13
Kafka Producer - A use case for asynchronous communication style
02:46
Quiz: Kafka Producer.
6 questions
Creating a new Spring Boot project
07:00
Kafka Producer configuration properties
06:48
Creating Kafka Topic
05:07
Run Microservice to create a new topic
03:08
Creating Rest Controller
05:24
Creating a Service class
04:38
Creating an Event class
04:00
Kafka Producer: Send Message Asynchronously
10:09
Kafka Asynchronous Send. Trying how it works.
05:40
Kafka Producer: Send Message Synchronously
04:50
Kafka Producer: Handle Exception in Rest Controller
05:16
Kafka Producer: Logging Record Metadata Information
02:22
Kafka Synchronous Send. Trying how it works.
02:45

Kafka Producer: Acknowledgements & Retries

12 lectures
Source code
00:04
Kafka Producer Acknowledgement: Introduction
06:12
Kafka Producer Retries: Introduction
08:17
Configure Producer Acknowledgments in Spring Boot Microservice
02:04
The min.insync.replicas configuration
05:40
Trying how the min.insync.replicas works
05:52
Producer Retries
01:47
Trying how Producer Retries work
03:52
Delivery & Request Timeout
03:55
Trying how Delivery & Request Timeout works
03:07
Quiz: Kafka Producer Acknowledgements and Retries
5 questions
Kafka Producer Spring Bean Configuration
08:24

Apache Kafka Idempotent Producer

3 lectures
Introduction to Idempotent Producer
05:51
Enable Kafka Producer Idempotence in application.properties
04:00
Enable Kafka Producer Idempotence in Spring Bean
07:59

Kafka Consumer - Spring Boot Microservice

12 lectures
Source code
00:04
Introduction to Kafka Consumer
04:00
Creating a new Spring Boot project
04:50
Kafka Consumer Configuration Properties
06:44
Kafka Consumer with @KafkaEventListener and @KafkaHandler annotations
04:43
Creating the "core" module
03:39
Adding "core" project as a dependency
04:46
@KafkaHandler: Trying how it works
02:30
Kafka Consumer Spring Bean Configuration
10:18
Kafka Listener Container Factory
02:37
Trying if Kafka Consumer Bean Configuration works
01:59
Quiz: Apache Kafka Consumer.
6 questions

Kafka Consumer - Handle Deserializer Errors

5 lectures
Source code
00:04
Introduction to Error Handling in Kafka Consumer
02:09
Causing the deserialization problem
03:22
Kafka Consumer ErrorHandlingDeserializer
03:16
Trying how ErrorHandlingDeserializer works
03:26

Kafka Consumer - Dead Leter Topic(DLT)

6 lectures
Source code
00:04
Introduction to Dead Letter Topic(DLT) in Kafka
03:21
Handle errors: The DefaultErrorHandler and DeadLetterPublishingRecoverer classes
03:53
Create and Configure KafkaTemplate object
06:08
Dead Letter Topic: Trying how it works
05:01
Quiz: Dead Letter Topic
3 questions

Kafka Consumer - Exceptions and Retries

9 lectures
Source code
00:04
Introduction to Exception handling in Kafka consumer and retries
02:47
Creating retryable and not retryable exceptions
02:47
Configure DefaultErrorHandler with a list of not retryable exceptions
02:45
Trying how not retryable exception works
06:24
Register RetryableException and define wait time interval
02:27
Throwing a RetryableException
07:49
Overview of a destination Microservice
03:15
Trying how retry works
08:13

Kafka Consumer - Multiple Consumers in a Consumer Group

8 lectures
Source code
00:04
Introduction to Kafka Consumer Groups
03:01
Rebalancing and Partition Assignment in Apache Kafka
04:45
Assigning Microservice to a consumer group
04:23
Starting up more Microservices
04:26
Trying how partitions assignment works
05:00
Multiple consumers consuming messages from Kafka topic
04:22
Quiz. Apache Kafka Consumer Groups
7 questions

Idempotent Consumer

10 lectures
Idempotent Consumer - Introduction
09:44
Include a unique id into message header
04:26
Reading a unique id from message header
04:07
Adding database-related dependencies
03:34
Configure database connection details
02:43
Creating JPA Entity
06:16
Create JPA Repository
02:40
Storing a unique message id in a database table
06:06
Check if Kafka message was processed earlier
03:56
Trying how it works
11:42

Apache Kafka Transactions

10 lectures
Introduction to Transactions in Apache Kafka
06:40
Demo Microservices and source code
03:24
Enable Kafka Transactions in application.properties
05:24
Enable Kafka Transactions in the @Bean method
05:31
Apache Kafka and @Transactional annotation
04:45
Rollback transaction for specific exception
04:02
Reading committed messages in Kafka Consumer
05:05
Excersize: Configure Consumer Microservice to read "committed" messages only
00:08
Trying how Kafka Transactions work
12:25
Apache Kafka local transactions with KafkaTemplate
05:11

Appendix A: Run Apache Kafka in a Docker Container

13 lectures
Introduction to Running Apache Kafka in a Docker Container
00:15
Download and Install Docker
04:09
Kafka Docker Compose: Initial Configuration
05:38
Apache Kafka KRaft Configuration
06:01
Apache Kafka Listeners Configuration
08:47
Kafka Docker Constainer: Volumes
03:37
Docker Compose and Environment File
02:09
Starting Single Kafka Server in Docker Container
02:42
Execute Apache Kafka CLI Scripts within Docker Container
06:24
Execute Apache Kafka CLI Commands in Docker from the Host Machine
02:30
Execute Apache Kafka CLI Commands on the Host Machine
05:07
Multiple Kafka Brokers in a Docker Compose File
05:01
Trying how it works
04:23

Apache Kafka and Database Transactions

6 lectures
Kafka & Database transactions - Introduction
06:39
Introduction to demo projects & Source Code
02:40
Creating Jpa Transaction Manager
05:19
Synchronized Transaction: Saving to database
04:04
Enable logging for Kafka and Jpa Transaction Managers
03:00
Trying how synchronized transactions work
10:59

Integration Testing - Kafka Producer

11 lectures
Overview of the System Under Test
03:04
Test class annotations
08:55
Creating an empty test method
03:02
Different ways to execute test methods
07:14
Test method structure. Arrange, Act and Assert.
01:00
Implementing the Arrange and Act sections
02:36
Consumer Configuration in a Test Class
08:47
The setUp() and tearDown() methods
05:59
The Assert section
04:30
Verify Producer Configuration Properties - Introduction
02:18
Test Method for Idempotent Producer
01:35

Integration Testing - Kafka Consumer

6 lectures
Overview of the Method Under Test
02:22
Creating a new test class
03:32
The 'Arrange' section
02:54
Mocking objects
09:20
The 'Act' and 'Assert' sections
07:39
Testing Kafka Consumer - Trying how it works
03:26

Appendix B: Install Apache Kafka on Windows

1 lectures
Install Apache Kafka on Windows. Article.
00:29

Bonus

1 lectures
Bonus lecture
02:10

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.