← all projects

Real-time SMS banking on a live transaction switch

ADR-001 · C# · SQL Server · event-driven · banking

The problem

A major bank needed real-time balance, withdrawal, transfer and alert notifications driven directly off core banking activity. The hard constraints: notifications had to be near-instant, the core banking system could not be slowed down, and a customer must never receive a wrong balance. A late SMS is annoying; a wrong one destroys trust.

Options considered

Polling the core database. Simple to build, but it puts constant read load on the core, adds latency (you're only as fast as your poll interval), and race conditions between the poll and in-flight transactions make wrong balances likely.

Event-driven off the transaction switch. The IRIS switch already sees every transaction as it happens. Hooking notification triggers to switch events gives sub-second latency with zero additional load on the core.

The decision

Event-driven, off the switch. I mapped switch events to notification triggers and kept three concerns strictly separate: message formatting, delivery, and account routing. That separation meant a delivery outage could never corrupt formatting logic, and new notification types were additive.

The hard part: partial and duplicate transactions

Transaction switches emit messy reality — reversals, timeouts, duplicate events. The defensive rules:

The result of that last rule: in production, a wrong balance never shipped.

Outcome

Real-time alerts live for 100K+ customers, sub-second from transaction to SMS, with no measurable load added to the core banking system.

What I'd do differently today

I'd put a message broker between the switch adapter and the notification engine from day one. We effectively rebuilt half of one with retry tables; RabbitMQ would have given us dead-lettering and replay for free.