Skip to content
Ignacio Perales

WhatsApp and messaging at scale

I work on the event-driven workers that send millions of WhatsApp messages a month for patient communication.

At Eniax, a Chilean health-tech company, patient communication such as appointment-related messages runs over WhatsApp, at millions of messages per month. The messages are processed by event-driven workers over RabbitMQ. On a platform I co-own, I use the same fan-out pattern for email campaigns.

Where I've used it

Eniax

Health-tech company, Chile

Employer2022-06 → now

Clinics communicate with their patients over WhatsApp, for example about their appointments. That traffic reaches millions of messages a month.

Built

  • Event-driven workers that process outgoing WhatsApp messages from RabbitMQ.
  • REST APIs in Python/Flask and NestJS, part of a set of microservices that talk over RabbitMQ.
WhatsApp messages per month
Millions
  • WhatsApp
  • RabbitMQ
  • Python
  • Flask
  • NestJS

Private community video platform

Anonymized · no name or link

Own

The platform sends email campaigns to its members.

Built

  • Email campaigns that fan out over RabbitMQ into individual sends, with open tracking.
  • RabbitMQ
  • NestJS

Architecture

Sending is decoupled from the services that ask for it. Outgoing messages travel through RabbitMQ, where event-driven workers pick them up and process them. The surrounding REST APIs are written in Python/Flask and NestJS, as part of a set of microservices that talk over RabbitMQ.

On the video platform I co-own, email campaigns use the same shape: one campaign fans out over RabbitMQ into individual sends, and opens are tracked.

Eniax · WhatsApp

    • Services / REST APIsPython/Flask, NestJS
    • RabbitMQqueue
    • Event-driven workers
    • WhatsApp

Video platform · Email campaigns

    • Campaign
    • RabbitMQfan-out
    • Individual email sends
    • Open tracking
  • Service
  • Message broker
  • Several instances
  • External

Services hand outgoing messages to RabbitMQ, where event-driven workers pick them up and process them for WhatsApp. On the video platform, one campaign fans out over RabbitMQ into individual email sends, and opens are tracked.

Demo

Simulated demo

Campaign simulator

Set up a synthetic appointment-reminder campaign and watch it fan out through a queue to a phone mockup. No real phone numbers or patient data.

Coming soonThis demo isn't built yet. The title and description above say what it will show.

Decisions & lessons

  1. Queue first. With RabbitMQ between the request and the send, the APIs don't wait on delivery, and a spike in volume becomes queue depth that workers work through.
  2. One pattern, two channels. Fan-out over a queue works the same for WhatsApp messages and for email campaigns, so what I learn on one carries over to the other.

Stack

  • WhatsApp
  • RabbitMQ
  • Python
  • Flask
  • NestJS