Skip to main content

Event and worker model

Event producers and consumers

State ownership

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.