Building payment processing engine with Stateful Functions and Spring Boot
summary
Proof of concept payment engine implements account and transaction as separate namespaces, deployed as two Spring Boot remote SDK modules; account stores balance and uses a negative-amount applyTransaction for withdrawals while transaction orchestrates withdraw → deposit and sends transaction accepted or declined messages. JSON/Jackson serializes commands, module.yaml uses wildcard namespace routing and two Kafka ingresses for initAccount and executeTransaction. Exactly-once to Kafka is achieved with exactly-once Kafka transactions tied to Flink checkpoints; CQRS egresses update a read store.
AI-written summary · about
chapters (13)
- 0:00Introduction and motivation
- 1:49Grimgotts bank transformation
- 2:56Designing payment functions
- 4:20Namespace design principles
- 5:25Embedded vs remote SDK
- 6:52Idempotency and delivery
- 7:57CQRS for data curation
- 8:39Code walkthrough start
- 9:00Account function implementation
- 11:03Spring Boot integration
- 11:45Transaction function logic
- 13:55Stateful Functions config
- 14:59Ingress configuration
related talks
43mBank clearing system
49mThe Benefits of Orchestration in Distributed Systems
01h 01mLost in transaction Strategies to manage consistency in distributed systems
40mCommunication between (micro-)services
48mUse actors, Luke
47mVirtual Threads, Structured Concurrency & Scoped Values: Putting it All Together
51mIntroducing Saga Pattern in Microservices with Spring Statemachine
55mA Payment System Over a Year
