This repository contains a couple of microservices which communicate using Kafka.
- Receive transaction info using endpoint:
POST http://localhost:8080/pay
{
"accountId": 1000, # ID consultant account
"amount": 120.20 # Replenishment amount
}
- Put it in Kafka topic
- Spring Boot Starter Web
- Spring Kafka Producer
- Get transaction from Kafka topic
- Persist it in MySQL database.
- Every 2 minutes append new transactions to CSV file in the form:
id;account_id;amount;datetime_transaction
1;1000;120.20;2022-07-28 07:00:00
- Spring without Boot
- Slf4j logger
- Hibernate
- MySQL database
- Flyway database migration tool
- Spring Kafka Consumer
- Opencsv for writing CSV files
# Run mySQL database
docker-compose -f docker-compose-mysql.yml -p mysql-easypay up -d
# Run Kafka
docker-compose -f docker-compose-kafka.yml -p kafka-easypay up -d