An open API service indexing awesome lists of open source software.

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

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

error

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

error

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.