How akkshatbhandari/real_time_email_queue_system works
This repository implements an asynchronous welcome-email queue: a client registers a user, the producer records the user, email job, and outbox event, and a publisher dispatches work for a consumer to send and track. The source index confirms the outbox publisher’s database and queue dependencies; the worker excerpt shows status checks, delivery, and acknowledgments. The README provides no further capability details, and several integrations are only partially sampled, so unsupported links are omitted or marked unverified.
Main entry points: users.py User API · database.py Producer database access · outbox_publisher.py Outbox publisher · worker.py Message worker
Components 18
Email producer
- User API
email_queue_system/producer/app/routes/users.py - FastAPI app
email_queue_system/producer/app/main.py - User schema
email_queue_system/producer/app/schemas/user.py - Welcome email builder
email_queue_system/producer/app/services/email_service.py
Producer records
- Producer database access
email_queue_system/producer/app/database.py - User record
email_queue_system/producer/app/models/user.py - Email job record
email_queue_system/producer/app/models/email_job.py - Outbox event record
email_queue_system/producer/app/models/outbox.py
Queue dispatch
- Outbox publisher
email_queue_system/producer/app/services/outbox_publisher.py - Queue publisher
email_queue_system/producer/app/services/queue_service.py
Email consumer
- Message worker
email_queue_system/consumer/app/worker.py - RabbitMQ consumer
email_queue_system/consumer/app/rabbitmq.py - Consumer database access
email_queue_system/consumer/app/database.py - SMTP email sender
email_queue_system/consumer/app/email_service.py
Other components
- API client
- RabbitMQ
- PostgreSQL
- SMTP service
Connections 20
- API client → FastAPI app: sends request
email_queue_system/producer/app/main.py - FastAPI app → User API: routes requests
email_queue_system/producer/app/main.py - User API → User schema: validates input
email_queue_system/producer/app/routes/users.py - User API → Welcome email builder: builds email
email_queue_system/producer/app/routes/users.py - User API → Producer database access: uses session
email_queue_system/producer/app/routes/users.py - User API → User record: creates user
email_queue_system/producer/app/routes/users.py - User API → Email job record: creates job
email_queue_system/producer/app/routes/users.py - User API → Outbox event record: creates event
email_queue_system/producer/app/routes/users.py - Producer database access → PostgreSQL: connects to
email_queue_system/producer/app/database.py - FastAPI app → Producer database access: creates tables
email_queue_system/producer/app/main.py - Outbox publisher → Producer database access: reads events
email_queue_system/producer/app/services/outbox_publisher.py - Outbox publisher → Outbox event record: loads events
email_queue_system/producer/app/services/outbox_publisher.py - Outbox publisher → Queue publisher: publishes through
email_queue_system/producer/app/services/outbox_publisher.py - Queue publisher → RabbitMQ: publishes messages
email_queue_system/producer/app/services/queue_service.py - Message worker → RabbitMQ consumer: consumes messages
email_queue_system/consumer/app/worker.py - RabbitMQ consumer → RabbitMQ: receives messages
email_queue_system/consumer/app/rabbitmq.py - Message worker → Consumer database access: checks and updates
email_queue_system/consumer/app/worker.py - Message worker → SMTP email sender: sends email
email_queue_system/consumer/app/worker.py - Consumer database access → PostgreSQL: connects to
email_queue_system/consumer/app/database.py - SMTP email sender → SMTP service: delivers via
email_queue_system/consumer/app/email_service.py