Event-driven middleware for core banking
The Finacle event-emitting module publishes transaction events to Kafka. Consuming microservices use dead-letter queues and read/write separation to handle high transaction volumes.
- context
- Emirates NBD
- outcome
- API access secured through a 3scale gateway
Context
At Emirates NBD, Finacle is the system of record, and many other systems need to react to what happens inside it. I work on this as a Technology Specialist at Synechron, on the bank's Finacle team.
Problem
When every downstream system asks the core directly for what it needs, the core carries all of that load on top of processing transactions. At high transaction volumes that is the wrong place to put it.
The systems around the core needed to learn about transactions as they happened, without each one being wired into Finacle, and without a failure in one consumer affecting the others or losing an event.
What I did
I set up Finacle's event-emitting module to publish transaction events to Kafka. Finacle states what happened once; anything that cares subscribes.
On the other side of Kafka I built the consuming microservices, in Python (Django REST Framework and Flask) and Node.js. Each consumer has a dead-letter queue, so an event it cannot process is held for attention instead of being dropped or blocking the events behind it.
To cope with volume, the services separate reads from writes: queries are answered from a read side, away from the write path. API access to all of it goes through a 3scale gateway, which handles security and throttling.
Architecture
Finacle core
Processes the transaction and remains the system of record.
Event-emitting module
Publishes a transaction event to Kafka when the transaction happens.
Kafka
Carries the events and keeps the core decoupled from whoever consumes them.
Consumer microservices
Python (Django REST Framework, Flask) and Node.js services that subscribe to the events.
Dead-letter queues
Hold any event a consumer cannot process, so nothing is lost.
Read side
Serves queries separately from the write path, for high transaction volumes.
3scale gateway
Secures and throttles API access to the services.
Outcome
Transaction events from the core are available to downstream services as they happen. A failing consumer holds its own events in its dead-letter queue and does not affect the rest, and read traffic no longer competes with writes.
Stack
- Kafka
- 3scale
- Python
- Django REST Framework
- Flask
- Node.js