This project aims to provide a simple demonstration of how event stream processing works with spring + kafka
- Docker/ Docker Compose
- Maven
- Java 8
Only tested on OSX, things may differ on windows (especially older versions with docker-machine etc)
- Open terminal at project root
- Run
mvn clean install -Pinstall-docker
You should see build output that indicates the docker images are being created and stored in your local docker registry.
- Open terminal and run
docker-compose up
After running the docker-compose up command you will see three different output logs for each of the containers provided within the docker-compose.yml file.
The environment created consists of:
- event-source with h2 embedded database
- Apache kafka/ zookeeper container
- event-log-sink
When docker compose successfully completes then the following will occur.
- event-source checks the embedded database (every second) for unprocessed events
- Unprocessed events will be placed onto the kafka events topic
- event-log-sink will then process each event placed on the topic, by simpling outputting it to the logs (which you will see within the docker-compose up terminal)