Skip to content

Navigation Menu

Sign in
Sign up

feat: Java anti-fraud transaction validation system - #606

Open
ChristopherEspejo wants to merge 1 commit into
yaperos:main from
ChristopherEspejo:feature/java-anti-fraud-microservices
Open

feat: Java anti-fraud transaction validation system #606
ChristopherEspejo wants to merge 1 commit into
yaperos:main from
ChristopherEspejo:feature/java-anti-fraud-microservices

Conversation

@ChristopherEspejo

@ChristopherEspejo ChristopherEspejo commented Mar 2, 2026

Copy link
Copy Markdown

Summary

  • Implemented two Java Spring Boot microservices with hexagonal architecture communicating via Apache Kafka
  • transaction-service: REST API (POST/GET /transactions) with PostgreSQL, Redis caching (TTL-based), and Kafka event publishing
  • antifraud-service: Kafka consumer that evaluates fraud rules (value > 1000 = rejected) with idempotency pattern

Tech Stack

  • Java 17, Spring Boot 3.2.5
  • Apache Kafka (async inter-service communication)
  • PostgreSQL (separate DB per service)
  • Redis (cache with differentiated TTL: 30s PENDING, 10min APPROVED/REJECTED)
  • Docker multi-stage builds
  • Testcontainers (integration tests)

Architecture

  • Hexagonal Architecture with ports & adapters pattern
  • Event-driven communication (no direct HTTP between services)
  • Manual Kafka offset commit for reliability
  • Idempotency in antifraud-service via evaluated_transactions table

...ring Boot
Two microservices with hexagonal architecture communicating via Kafka:
- transaction-service: REST API for creating/querying transactions with
 PostgreSQL persistence, Redis caching (TTL-based), and Kafka event publishing
- antifraud-service: Kafka consumer that evaluates fraud rules (value > 1000
 = rejected), with idempotency via evaluated_transactions table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /