This is an implementation of exercise: Bank Balance in Udemy course: Apache Kafka Series - Kafka Streams for Data Processing.
- Spring Boot
- Kafka Stream
- Kafka
- Gradle
This exercise is focusing on the Exactly-once semantics of Kafka.
BankTransactionsProducer
produces three transactions per second to topicbank-transaction
.- Stream application
transaction-update-stream
receives transactions and updates balance by counting the number of transaction, aggregating amount, and updating time to the latest time, and finally sends the balance tobank-balance
topic. BankBalanceConsumer
consumes the balance and logs to screen.
WARNING: this might not be the best practice.
You need to have a kafka bootstrap-server running at localhost:9092
.
gradle bootRun