On this page
  1. Why it matters
  2. Queues and logs
  3. The landscape
  4. How to choose
  5. Handling repeats safely
  6. Trade-offs
  7. Pitfalls
  8. Questions for a design review

Why it matters

Banks connect hundreds of systems. Calling each one directly and waiting for an answer makes every system as slow and as fragile as the slowest one it calls. Messaging lets a system hand off work and carry on, while another system picks it up when it can. It is how banks absorb peaks, decouple teams and feed real-time fraud and analytics.

Queues and logs

A queue holds messages until a consumer takes them, and each message goes to one consumer. It suits distributing work: “send this SMS”, “generate this statement”. A log keeps messages in order for a set time, and any number of consumers read it at their own pace, each keeping its own position. It suits event streams, audit trails and feeding several systems from one source. Event-driven architecture covers the design patterns.

The landscape

Messaging and streaming technologies
TechnologyModelTypical use in Indian bankingWatch out for
Apache Kafka (and managed or compatible services)Partitioned, replicated logEvent streams, change data capture, feeding fraud and analyticsOperational complexity; ordering holds only within a partition
RabbitMQBroker with queues and flexible routingTask distribution between servicesThroughput ceilings at very high volumes
IBM MQEnterprise queue manager with transactionsMessaging with mainframes and older coresLicence cost and specialist skills
Cloud messaging servicesManaged queues and streamsCloud-hosted channels and analyticsData residency and outsourcing obligations
Apache FlinkStateful stream processingReal-time fraud features, running totals, alertsState management and upgrades need care
Spark Structured StreamingMicro-batch stream processingNear-real-time analytics and data pipelinesLatency of seconds rather than milliseconds

Typical uses are general industry patterns, not claims about named banks. Product names are for reference only.

How to choose

Ask three questions. Does more than one system need the same message? If so, a log. Must messages stay in order? If so, which ones: usually all messages for one account or one payment, which a partitioned log can keep together. How long must messages be kept? A queue deletes a message once handled; a log can keep days or weeks, so a new consumer or a fixed bug can replay history.

Scale matters too. The UPIUnified Payments Interface. NPCI's real-time system for paying from a bank account with a UPI ID, QR code or phone number, through apps on a phone. system alone averages 791 million a day1Business Standard. UPI sets new record at 24.51 bn transactions in Aug, value at ₹29.82 trn. As of 31 August 2026., so a bank’s messaging layer must absorb peaks without back-pressure reaching customers.

Handling repeats safely

Almost every messaging system can deliver a message more than once, for example after a timeout and retry. For money, a repeated message must never move money twice. The usual answer is an idempotent consumer: it records each message’s unique key and ignores keys it has already processed.

An idempotent consumer (illustrative)

async function handle(msg: PaymentMessage) {
// The key comes from the sender and is the same on every retry.
const seen = await db.processed.find(msg.idempotencyKey);
if (seen) return seen.result; // already done: return the same answer

return db.transaction(async (tx) => {
  const result = await postToLedger(tx, msg);
  await tx.processed.insert({ key: msg.idempotencyKey, result });
  return result;
});
}

Trade-offs

Messaging choices
ChoiceYou gainYou give up
QueueSimple work distribution; message gone once handledNo replay; one consumer per message
LogMany consumers, replay and historyRetention to manage; ordering only per partition
Managed cloud serviceNo cluster to runProvider dependence, residency and outsourcing rules
Self-run clusterFull control on-premisesSpecialist operations team

Pitfalls

  • Assuming exactly-once delivery and skipping idempotency checks.
  • Hot partitions, where one busy key, such as a large merchant, overloads a single partition.
  • Unbounded retries that hammer a failing system; use back-off and a dead-letter queue for messages that keep failing.
  • Silent consumer lag with no alert.
  • Changing message formats without versioning, breaking consumers.

Questions for a design review

  • What is the key for each message, and does every consumer check it?
  • Which messages must stay in order, and what partition key guarantees that?
  • Where do messages go after repeated failure, and who looks at them?
  • How far can each consumer fall behind before an alert fires?
  • How long are messages kept, and does that respect data retention rules?