https://github.com/mccantuta/kafka-springboot-poc
Proof of concept of Kafka using Springboot
https://github.com/mccantuta/kafka-springboot-poc
docker docker-compose kafka streams
Last synced: 5 months ago
JSON representation
Proof of concept of Kafka using Springboot
- Host: GitHub
- URL: https://github.com/mccantuta/kafka-springboot-poc
- Owner: mccantuta
- License: gpl-3.0
- Created: 2019-07-28T22:01:44.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-30T00:59:33.000Z (almost 7 years ago)
- Last Synced: 2023-08-23T00:30:31.839Z (almost 3 years ago)
- Topics: docker, docker-compose, kafka, streams
- Language: Java
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kafka-springboot-poc
Proof of concept of Kafka using Springboot
This project use a kafka server from wurstmeister/kafka image (https://hub.docker.com/r/wurstmeister/kafka).
Use for docker compose the file **docker-compose-kafka-server.yml** included in this project.
```
docker-compose -f docker-compose-kafka-server.yml up -d
```
Package SpringBoot app
```
mvn clean package
```
Build docker image
```
docker build -t kafka-poc .
```
Run container
```
docker run -p 8080:8080 --network kafka-poc-network kafka-poc
```
This SpringBoot application will create a topic named "newCustomerCreated" with 3 partitions and 3 replicas.
Create three instances of this application with docker-compose to observe how
each instance consume from each Kafka partition
```
docker-compose scale kafka-poc=3
```