FastAPI RabbitMQ Celery Flower Starter

FastAPI + Celery + RabbitMQ sample that queues SMS (Twilio) and email (Brevo) with Flower monitoring.

Queue SMS and email sends from a FastAPI API with Celery workers and monitoring

This project is a multi-service sample: a FastAPI service triggers work, RabbitMQ carries messages, Celery workers process SMS (via Twilio) and transactional email (via Brevo / Sendinblue), PostgreSQL stores message status, and Flower gives visibility into workers. Docker Compose ties the pieces together with health checks, as described in the README.

When it is useful

You are learning or prototyping async notifications, you need a reference for separate SMS and email queues, or you want a lab to test provider credentials safely before production hardening. Treat costs, deliverability, and compliance as your operational problem.

What you can do

  • Call the documented REST surface to enqueue SMS and email jobs.
  • Operate RabbitMQ, workers, DB, and Flower from the compose setup in the repository.
  • Swap or extend webserver and worker code paths following the project layout (Poetry is noted for dependency management).

Limits

  • Delivery rates, spam policy, and telecom rules follow Twilio, Brevo, and your jurisdiction; this repo does not certify compliance.
  • Default dashboard credentials in the README are for local experimentation only; rotate everything before any shared environment.
  • Throughput and reliability in production require your tuning, retries, idempotency, and observability, not just this starter.

Frequently asked questions

What stack does this starter wire together?

FastAPI enqueues work, RabbitMQ 3 carries messages on separate SMS and email queues, Celery workers send SMS via Twilio and transactional email via Brevo/Sendinblue, PostgreSQL 14 stores status, and Flower monitors workers. Docker Compose adds health checks; Poetry manages Python deps.

What can I enqueue from the API?

Call the documented REST surface (Swagger at localhost:8000/docs after compose up) to enqueue SMS and email jobs. RabbitMQ Management UI is at localhost:15672 and Flower at localhost:5555.

Are the default dashboard credentials safe for shared environments?

No. README defaults (RabbitMQ admin_user/admin_pass, Flower admin/supersecret) are for local experimentation only. Put Twilio and Brevo secrets in the webserver and worker .env files, and rotate everything before any shared environment.

Does this repo guarantee SMS/email compliance?

No. Delivery rates, spam policy, and telecom rules follow Twilio, Brevo, and your jurisdiction. Throughput, retries, and idempotency need your own production tuning. License is AGPL-3.0.

Continue exploring