The goal of this project is to create two applications: one as a Spring Boot
producer and the other as a Spring Boot
consumer. We'll be using Spring for Apache Kafka
and Spring Cloud Stream
.
Similar projects are: spring-kafka-de-serialization-types
and spring-cloud-stream-kafka-elasticsearch
.
On ivangfr.github.io, I have compiled my Proof-of-Concepts (PoCs) and articles. You can easily search for the technology you are interested in by using the filter. Who knows, perhaps I have already implemented a PoC or written an article about what you are looking for.
- [Medium] Implementing a Kafka Producer and Consumer using Spring Cloud Stream
- [Medium] Implementing Unit Tests for a Kafka Producer and Consumer that uses Spring Cloud Stream
- [Medium] Implementing End-to-End testing for a Kafka Producer and Consumer that uses Spring Cloud Stream
- [Medium] Configuring Distributed Tracing with Zipkin in a Kafka Producer and Consumer that uses Spring Cloud Stream
- [Medium] Using Cloudevents in a Kafka Producer and Consumer that uses Spring Cloud Stream
- [Medium] Running in Minikube (Kubernetes) a Kafka Producer and Consumer that uses Spring Cloud Stream
-
Open a terminal and inside
spring-cloud-stream-kafka-multi-topics
root folder run:docker compose up -d
-
Wait for Docker containers to be up and running. To check it, run:
docker compose ps
-
Create the Kafka topics used by the applications:
./create-kafka-topics.sh
-
Kafdrop
Kafdrop
can be accessed at http://localhost:9000
To stop and remove docker compose containers, network and volumes, go to a terminal and, inside spring-cloud-stream-kafka-multi-topics
, run the command below:
docker compose down -v
To remove the Docker images created by this project, go to a terminal and, inside spring-cloud-stream-kafka-multi-topics
root folder, run the following script:
./remove-docker-images.sh