Platform

Eventing model

How commands, events and queries are used across Acme Inc's event-driven commerce platform.

Contracts

The catalog separates messages by intent.

  • Commands ask another capability to do something.
  • Events announce that something has already happened.
  • Queries request information without changing state.

Commands

Commands are named in the imperative and should have one clear handler. Examples:

Events

Events are facts and should be safe for multiple consumers. Examples:

Queries

Queries are explicit read contracts. Examples include Get ProductGet ProductQueryv1.0.0Query to fetch a single product by its identifier. Ownerproduct-platformSchemaMapView docs, Search ProductsSearch ProductsQueryv1.0.0Query to search the catalog for products matching a term, with optional filters and pagination. Ownersearch-platformSchemaMapView docs, Get OrderGet OrderQueryv1.0.0Query to fetch a single order by its identifier. Ownerordering-platformSchemaMapView docs, Get CustomerGet CustomerQueryv1.0.0Query to fetch a single customer by their identifier. Ownercustomer-platformSchemaMapView docs, Get Stock LevelGet Stock LevelQueryv1.0.0Query to fetch the current available stock level for a product. Ownerfulfilment-platformSchemaMapView docs and Get Product ReviewsGet Product ReviewsQueryv1.0.0Query to fetch the published reviews and aggregate rating for a product. Ownerreviews-platformSchemaMapView docs.

Versioning expectations

Backward-compatible additions are preferred. Removing fields or changing semantics requires a versioned contract and a migration plan. For customer-critical flows, review the flow page and all participating messages before changing a schema.

Failure expectations

Consumers should be idempotent. Producers should publish facts after durable state changes. Long-running processes should persist their progress, especially Checkout SagaCheckout SagaFlowv1.0.0How the Checkout Orchestrator turns a checked-out cart into an order — reserving inventory, authorizing payment and crea...Ownerordering-platformView flowView docs, payment processing, search indexing and review moderation.