https://github.com/prabhakar-naik/spring-kafka-app
Kafka application using spring boot The "spring-kafka-app" project is a Spring Boot application that demonstrates the integration of Apache Kafka with Spring Kafka for building scalable and reactive messaging systems. It showcases how to produce and consume messages asynchronously using Kafka topics and Spring Kafka's template and listener componen
https://github.com/prabhakar-naik/spring-kafka-app
docker docker-compose java kafka kafka-consumer kafka-producer pom restful-api spring-boot xml
Last synced: about 2 months ago
JSON representation
Kafka application using spring boot The "spring-kafka-app" project is a Spring Boot application that demonstrates the integration of Apache Kafka with Spring Kafka for building scalable and reactive messaging systems. It showcases how to produce and consume messages asynchronously using Kafka topics and Spring Kafka's template and listener componen
- Host: GitHub
- URL: https://github.com/prabhakar-naik/spring-kafka-app
- Owner: Prabhakar-Naik
- Created: 2024-05-11T11:07:19.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-13T11:19:53.000Z (almost 2 years ago)
- Last Synced: 2025-04-08T17:21:40.010Z (about 1 year ago)
- Topics: docker, docker-compose, java, kafka, kafka-consumer, kafka-producer, pom, restful-api, spring-boot, xml
- Language: Java
- Homepage:
- Size: 186 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spring-kafka-app
The "spring-kafka-app" project is a Spring Boot application that demonstrates the integration of Apache Kafka with Spring Kafka for building scalable and reactive messaging systems. It showcases how to produce and consume messages asynchronously using Kafka topics and Spring Kafka's template and listener components. This project highlights the benefits of event-driven architecture and real-time data processing using Kafka within a Spring Boot environment, making it suitable for building robust and efficient microservices and streaming applications.
Kafka application using spring boot
# Using Docker we can run the Kafka: to configure below setup in docker compose.yml in your project

It will configured and pull the images and create the containers in docker Desktop
Next you must connect docker desktop before running this command:
==> docker-compose up

You can see the running containers on docker: command is:
==> docker ps (actively running)
To create topic in the Kafka: use this command:
==> docker-compose exec broker kafka-topics --create --topic my_topic --partitions 1 --replication-factor 1 --bootstrap-server broker:9092
To get list of topics use this command:
==> docker-compose exec broker kafka-topics --list --bootstrap-server broker:9092
TO Consume the events or messages from your topic producer use this command:
==> docker-compose exec broker kafka-console-consumer --topic my_topic --from-beginning --bootstrap-server broker:9092
To Produce the events or messages in your topic from using this command:
==> docker-compose exec broker kafka-console-consumer --topic my_topic --from-beginning --bootstrap-server broker:9092
To Run the spring boot application using maven library use this command:
==> ./mvnw spring-boot:run
Then configure your application with java with required dependencies in pom or gradle.
# The Cloned Application must build as a project in your familiar IDE.
Thank You.
Prabhakar-Naik.