Skip to main content

Event and worker model

Event producers and consumers

CapabilityEvidence
Atlas restock/event processingatlas/app/service/sqs_consumer.py, sns_service.py
Vector checkout eventsvector/README.md, vector/app/service/
Storehouse event workerstorehouse/app/worker_main.py, storehouse/app/service/storehouse_worker.py
Orderbox post-order workerorderbox/app/worker_main.py, orderbox/app/config.py
Notify queue consumptionnotify/app/service/sqs_consumer.py, notification_service.py
Gearbox schedules and Celery workersgearbox/celery_app.py, Dockerfiles for worker/beat/events worker
Konsilo booking SQS consumptionkonsilo-be/src/ consultation-booking consumer

State ownership

StoreServices with directly evidenced useTypical responsibility
PostgreSQLAtlas, Dermadesk, Estimo, Hodor, Konsilo, Medusa, Notify, Orderbox, Reflekt, Storehouse, TetrisDurable domain data and transactional state
RedisAtlas, Compass, Dermadesk, Estimo, Gearbox, Hodor, Medusa, Notify, Reflekt, Sesh, Storehouse, Tetris, VectorCache, locks, session/OTP state, worker broker/result, and atomic reservations
S3Atlas, Dermadesk, Gearbox, Konsilo, Medusa, Orderbox, StorehouseFiles, media, imports/exports, and integration payloads
SNS/SQSAtlas, Gearbox, Konsilo, Notify, Orderbox, Storehouse, VectorEvent transport, worker delivery, and DLQ isolation

Important consistency boundaries

  • Reservations: Storehouse uses Redis/Lua-backed atomic reservation behavior. Inspect and test reservation expiry/compensation before changing checkout or allocation behavior.
  • Commerce: Medusa uses PostgreSQL plus Redis-backed cache, locking, event bus, and workflow facilities. Transactional assumptions should follow Medusa workflow boundaries.
  • Payments: Mint gateway callbacks are an asynchronous boundary. Payment state must be reconciled with downstream callbacks and order status rather than relying only on client responses.
  • Notifications: Notify is a consumer/dispatcher. Producers should publish idempotent events and preserve identifiers needed for retry and deduplication.

Operational guidance

Every new queue producer should define a schema, idempotency key, retry policy, owner, DLQ handling path, and observable correlation identifier before deployment.