# Message Center - Redesigning the messaging experience on the Grab superapp

[Grab](https://yomu.fyi/company/grab) · Jonathan Lee · Apr 17, 2023

**Type:** Problem & solution

## Summary

Grab redesigned its messaging infrastructure from GrabChat to Message Center to overcome two-party chat limitations and support complex superapp requirements like group conversations and varied user roles. The architecture separates core processing logic from message delivery by splitting the system into a backend processor and an independently scalable postman service. Communication relies on an in-house TCP gateway named Hermes that proxies client payloads via gRPC, alongside Apache Kafka streams and Amazon SQS delay queues. Custom client-server acknowledgements and a DynamoDB event store ensure reliable message delivery even across dropped mobile TCP connections and offline reconnects.

## Context

Grab's legacy chat system, GrabChat, was designed strictly for two-party chats and could not support group messaging, custom multi-user UI logic, translation, profanity filtering, or system-generated notifications across the expanding superapp.

## Approach / What changed

Grab built Message Center with decoupled message-center backend and postman delivery services connected through Apache Kafka and Amazon SQS, using a TCP gateway (Hermes) that proxies traffic over gRPC, a custom bidirectional ACK protocol, DynamoDB event state tracking, and fallback push notifications via Hedwig.

## Takeaways

- Decoupling the message processing backend from the postman delivery service enables message delivery to scale independently when group chats multiply outbound message volume.
- Because standard TCP packets lack inherent application-layer response guarantees, a bidirectional ACK system with idempotent event IDs is necessary to verify delivery and avoid cascading retry loops.
- When client TCP connections drop, Message Center triggers push notifications via Hedwig and records pending events in DynamoDB, replaying undelivered messages once the client reconnects and notifies Hermes.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [gRPC](https://yomu.fyi/topic/grpc), [Kafka](https://yomu.fyi/topic/kafka), [Microservices](https://yomu.fyi/topic/microservices), [Scalability](https://yomu.fyi/topic/scalability)

[Read original post](https://engineering.grab.com/message-center)
