Voucher Status Reconciliation
Owned a state machine based voucher reconciliation module ensuring data consistency, idempotency, and correctness across usage and reversal flows.
- Role
- Backend Engineer
- Timeline
- 2025
- Team
- 2
- Domain
- E-Commerce / Promotion
- Stack
- 8 tech
- Status
- Live
Overview
The Voucher Status Reconciliation initiative kept voucher state consistent across usage and reversal scenarios. I independently owned the core reconciliation module end-to-end, from technical design through implementation, release, and post-deployment monitoring.
Gallery
A backend has no screens, so its "UI" is the operational surface: the reconciliation API, the event flow, and stability monitoring.
Problem & Solution
Voucher state could drift between usage and reversal flows, risking data integrity and incorrect reconciliation under exceptional conditions. The module needed strong idempotency guarantees and reliable event handling on an unfamiliar, configuration-heavy platform.
I designed and implemented a state machine based use case flow that enforces data integrity, idempotency, and reconciliation correctness. I consumed voucher state changes via RocketMQ and integrated CDC / event bus / MQ mechanisms, aligning synchronous versus asynchronous flows with reconciliation business rules and validating operational safety.
Workflow
Three actors interact with the service; the diagrams are written in English to stay consistent across both languages.
Architecture
The Voucher Service publishes state changes to RocketMQ, which the reconciliation module consumes and validates through the state machine before persisting reconciled state. A CDC pipeline and the event bus support online data handling, and Prometheus / Grafana provide post-release stability monitoring.
Features
- State machine based use case flow
- Idempotent state transitions
- Usage & reversal reconciliation
- RocketMQ event consumption
- CDC pipeline / event bus integration
Tech Stack
Engineering Challenges
Voucher state had to stay correct across usage and reversal under both normal and exceptional conditions. Fix: a state machine based flow with idempotent transitions and clear reconciliation logic that isolates edge cases.
The reconciliation platform, RocketMQ, a CDC data pipeline, and the event bus were all new. Fix: rapid ramp-up plus tight alignment with the tech owner to apply the mechanisms correctly in production without heavy dependency on others.
A complex reconciliation module still had to ship on time. Fix: self-documented code, well-defined abstractions, and early risk surfacing to keep rework low while protecting design quality.
Outcomes
Lessons Learned
Reconciliation correctness depends on disciplined state design and idempotency more than raw code volume. Frequent, proactive alignment with the tech owner was essential to apply a new toolchain correctly and to surface abnormal signals early.
Related Santekno Tutorials
Interested in working together?
Order, payment, or high-traffic event pipelines — let's talk architecture and trade-offs.