Midas Core is a distributed financial processing system built with Spring Boot and Apache Kafka. It handles high-volume transaction processing, real-time balance management, and integrates with external microservices to apply transaction incentives.
The project follows a microservices-oriented architecture:
- Producer: Simulates financial transactions being sent to a Kafka topic.
- Midas Core (Consumer): Listens to Kafka, processes transactions, and updates the PostgreSQL/H2 database via Hibernate.
- Incentive API (External Service): A separate REST service that determines if a transaction qualifies for a reward/bonus.
- REST API: A balance inquiry endpoint that allows external systems to query user accounts in real-time.
- Java 17
- Spring Boot 3.x (Web, Data JPA, Validation)
- Apache Kafka (Message Broker)
- Hibernate (ORM)
- JUnit 5 & Embedded Kafka (Testing)
- Lombok (Boilerplate reduction)
- Configured Kafka listeners to ingest
Transactionobjects. - Implemented JPA entities for
UserandTransactionrecords. - Established a relational database schema to track historical balances.
- Integrated an external Incentive API using
RestTemplate. - Developed logic to adjust transaction amounts based on external "bonuses" before updating account balances.
- Created a
GET /balanceendpoint to retrieve real-time user data. - Implemented a custom
Balancefoundation object for standardized API responses. - Verified the full end-to-end flow (Kafka -> Processing -> Incentive -> REST) using a dedicated verifier test suite.
- Start the Incentive API:
java -jar incentives-api.jar