Distributed System

Remittance Engine

Remittance Engine

Remittance Engine models what a real cross-border payments backend has to get right. A sender requests a locked FX quote, cached in Redis under a TTL, then executes an order that claims it. A background poller drives the order through reservation, payout, and settlement, or through failure, compensation, and dead-lettering when the payout network rejects it. Funds are reserved by debiting the sender and crediting a pending-settlement account inside a single database transaction before the payout call, and reversed the same way if it ultimately fails, so money is never left in limbo. Resilience4j wraps the payout provider with retry using backoff and jitter plus a circuit breaker, rate limiting applies per user and per corridor, and Micrometer with OpenTelemetry traces the saga end to end.

Technologies Used

JavaJava
Spring Boot
PostgreSQLPostgreSQL
RedisRedis