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 the
spring-cloud-stream-kafka-multi-topicsroot folder run:docker compose up -d
-
Wait for Docker containers to be up and running. To check it, run:
docker ps -a
-
Create the Kafka topics used by the applications:
./create-kafka-topics.sh
-
Kafdrop
Kafdropcan be accessed at http://localhost:9000
To stop and remove docker compose containers, network and volumes, in a terminal, navigate to the spring-cloud-stream-kafka-multi-topics folder, run the command below:
docker compose down -vTo remove the Docker images created by this project, in a terminal, inside the spring-cloud-stream-kafka-multi-topics root folder, run the following script:
./remove-docker-images.sh