this is up to the consumer container to print the value since the application one have been splitted
48 lines
2.3 KiB
Markdown
48 lines
2.3 KiB
Markdown
# Kafka + Quarkus + Docker : Demonstration
|
|
|
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
[](https://kotlinlang.org/)
|
|
[](https://kafka.apache.org/)
|
|
[](https://quarkus.io/)
|
|
[](https://www.docker.com/)
|
|
|
|
A small university project to discover the [Quarkus Framework](https://quarkus.io/) combined with the
|
|
[Kafka library](https://kafka.apache.org/), the whole compatible with [Docker](https://www.docker.com/).
|
|
|
|
## Run
|
|
You can run the project very simply with either [Intellij IDEA](https://www.jetbrains.com/idea/),
|
|
or directly within a terminal.
|
|
|
|
### Intellij IDEA
|
|
Simply clone and load the project into the IDE and in the
|
|
[run configurations](https://www.jetbrains.com/help/idea/run-debug-configuration.html),
|
|
choose `compose`.
|
|
|
|
### Terminal
|
|
Alternatively, you can build and run the project manually by using
|
|
[gradle](https://gradle.org/) and launching the application with [docker-compose](https://docs.docker.com/compose/).
|
|
|
|
```shell
|
|
# build the modules
|
|
(cd ./applications/consumer/ && ./gradlew build)
|
|
(cd ./applications/converter/ && ./gradlew build)
|
|
(cd ./applications/producer/ && ./gradlew build)
|
|
# start the docker based on the docker-compose.yaml file
|
|
docker compose up
|
|
```
|
|
|
|
## Configuration
|
|
The configuration can be modified in the [docker-compose.yaml](./docker-compose.yaml) file to fit your needs.
|
|
|
|
You can find a list for each module of the project containing their individual configuration :
|
|
- [producer](./applications/producer/README.md)
|
|
- [consumer](./applications/consumer/README.md)
|
|
- [converter](./applications/converter/README.md)
|
|
|
|
## Expectation
|
|
The `consumer` container shall print the current temperature at the selected place in Fahrenheit every minute.
|
|
You can also access this value with the REST api at the `http://localhost:8080/v1/temperature` endpoint.
|
|
|
|
## References
|
|
The project use the [Open-Meteo](https://open-meteo.com/) API to fetch the current temperature at the
|
|
given location.
|