Skip to content

kuzds/easy-pay

Repository files navigation

Easy-pay

This repository contains a couple of microservices which communicate using Kafka.

Payment-ms

Features:

  • 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

Technology stack:

  • Spring Boot Starter Web
  • Spring Kafka Producer

Backend-ms

Features:

  • 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

Technology stack:

  • Spring without Boot
  • Slf4j logger
  • Hibernate
  • MySQL database
  • Flyway database migration tool
  • Spring Kafka Consumer
  • Opencsv for writing CSV files

Local development

# 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      

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages