Stock REST API using stream processing with Apache Kafka and KSQL database.
Application is exposing stock data via REST API. It was build using Contract-First approach.
Apache Camel framework is used for routing and processing data. Stock service is build on top of Apache Kafka. ksqlDB is used for retrieving data by performing SQL syntax queries.
It is fully tested solution with both unit tests and integration tests. For integration tests there are used technologies such as testcontainers and Cucumber.
- Java 17
- Spring Boot
- Apache Camel
- Apache Kafka
- KSQL
- Open API 3.0
- Test containers
- Cucumber
- JUnit 5
To run this project, build it locally with Maven:
$ mvn clean package
Then you need to create docker image of stock streaming application:
$ mvn docker:build
Then you can run all services containers with docker compose file:
$ cd <project-path>\stock-streaming-service\src\main\docker
$ docker compose up -d
It will allow you to run whole cluster: zookeeper, Kafka broker, KSQL database server and streaming application.