What you need to know about Spring Boot & Kafka

Published: 30 April 2023
on channel: Fast and Simple Development
737
25

🔥 Today your going to learn how to use Spring Boot to connect and Publish Messages into Kafka, you will learn how to setup Kafka in a simple Docker container using my simple docker compose file provided in my GitHub.

In a few minutes you will have Kafka up and running and sending messages using the command line utilities to validate the installation.

In a few more minutes you will have your first Java Spring Boot Kafka Producer up and running sending messages into a Topic.

In a few more minutes you will have your first Java Spring Boot Kafka Consumer up and running receiving messages from a Topic.

Don't wait any longer to Learn Kafka and Spring Boot.

Get Java and Spring Boot Pro Tips and Tricks like never before.

I'll show you tips to reduce the amount of unwanted Kafka Producer logs from the system as well with one line of property settings.

Check out the code here: https://github.com/ThomasJay/KafkaDemo

More can be found on my Udemy classes: https://www.udemy.com/user/tomjay2

Find this and more on my GitHub: https://github.com/ThomasJay

As well as my Web site: https://www.thomasjayconsulting.com

I want to help you learn and find an Amazing Job or just increase your Skills.

Times

00:00 Introduction
00:20 Docker Desktop
00:30 Docker Compose for Kafka
00:48 Starting the container with Docker Compose Up
01:04 SSH into Kafka Docker container
01:23 Create new Topic first_topic
01:47 List Topics
02:00 Describe Topic
02:48 Create Command Line kafka-console-consumer
03:35 Create Command Line kafka-console-producer
03:45 Sending Test Messages with Kafka command line tools
04:20 Create Sprint Boot Project with Lombok and Kafka support
05:35 Adding Kafka properties in application.properties
06:40 Create Kafka Rest Controller
08:30 Create Kafka Service
10:50 Add Kafka Template
12:00 Finished send method
12:30 Send Post with Message to be Published into Kafka Topic
13:05 Verifying kaka message from Topic in Kafka Console Consumer
13:50 Removing Kafka Log ProducerConfig values messages
15:00 Kafka Consumer Service
15:10 KafkaListener Annotation
15:27 Getting value from properties file using Sprint EL
16:05 Send Message thru Producer and receive in Consumer code
17:50 Wrap up



#java #kafka #springboot