Suraj’s story

Building mPokket's Kafka Consumer for mCoin Expiry

Built a Kafka consumer service with idempotency guarantees to automate reward expiry at scale across the lending platform.

Suraj Nanda

SDE 2 at Acko

AAcko
MmPokket
NNinjacart
AAntino
BBRAINOVISION SOLUTIONS INDIA PVT.LTD
5+ years of experience

From their time as

M

Software Engineer

mPokket • 2023 - 2025

Overview

mPokket's lending platform rewarded users with mCoins, an internal reward currency. When a user crossed thirty days past due on a loan repayment, the platform needed to automatically expire their mCoin balance. The process was event-driven: a Kafka event was triggered when a user hit DPD 30, and a consumer needed to process that event and expire the relevant coins.

The Story

mPokket's lending platform rewarded users with mCoins, an internal reward currency. When a user crossed thirty days past due on a loan repayment, the platform needed to automatically expire their mCoin balance. The process was event-driven: a Kafka event was triggered when a user hit DPD 30, and a consumer needed to process that event and expire the relevant coins.

Suraj owned the consumer design and development. The core challenge was reliability: in a high-volume event stream, duplicate events are a real risk, and processing the same expiry event twice could corrupt user balances.

He designed and implemented the idempotency layer within the consumer. When an event arrived, the service checked whether it had already been processed; if so, it was ignored. This ensured that even if the same event was delivered more than once, the outcome remained correct.

The consumer handled ten thousand-plus calls daily, processing transactional messages in real time and keeping data consistent across the microservices that depended on mCoin state.