Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/romchela/kafka-streams-crypto
Calculating arithmetic mean using kafka streams
https://github.com/romchela/kafka-streams-crypto
kafka kafka-streams
Last synced: about 1 month ago
JSON representation
Calculating arithmetic mean using kafka streams
- Host: GitHub
- URL: https://github.com/romchela/kafka-streams-crypto
- Owner: Romchela
- License: gpl-2.0
- Created: 2018-09-07T18:14:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-20T20:45:19.000Z (over 2 years ago)
- Last Synced: 2023-02-27T09:26:10.139Z (almost 2 years ago)
- Topics: kafka, kafka-streams
- Language: Java
- Homepage:
- Size: 29.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kafka-Streams crypto
This is test application which calculates current price of different crypto currencies. Information goes to kafka. Then, price is available by REST API. Coefficients of each stock is located in ```application.yml``` file.
## Dependecies
1) Python3 and kafka-python library
2) Java 8
3) Maven
4) Docker## How to run
1) Run kafka in docker-container ```docker-container up```
2) Run application ```mvn spring-boot:run```## How to use
1) Send messages to kafka (you can use tests/producer.py script with 3 arguments: product name, source name, price)
2) Get price of product by REST API GET request ```localhost:8080/api/v1/{product}/price```## How to run tests
1) Package application: ```mvn clean package```
2) Go to ```tests/``` folder
3) There are several bash scripts which are tests (suffix *test.sh)
3) Run test ```bash run-test.sh large_test```## Current problems
Tests are not stable for every environment because ```sleep``` is used after commands to run kafka or spring-boot application. So, sometimes (first launching) it takes much time and tests fail. In near future I'm going to integrate application with kafka to docker container, then integrate it to JUnit by Maven plugin and use this approach as test infrastructure.