service
Inventory Service

Inventory Service

The system of record for stock. Reserves and releases inventory, serves stock-level queries, and publishes events when stock is reserved or unavailable.

Service

Overview

The Inventory Service is the heart of the Inventory System. It receives Reserve InventoryReserve InventoryCommandv1.0.0Command to reserve stock for the items in a checked-out cart. Ownerordering-platformSchemaMapView docs during checkout and replies with Inventory ReservedInventory ReservedEventv1.0.0Published when stock has been successfully reserved for an order. Ownerfulfilment-platformSchemaMapView docs or Inventory UnavailableInventory UnavailableEventv1.0.0Published when stock could not be reserved for an order. Ownerfulfilment-platformSchemaMapView docs. It also handles Release InventoryRelease InventoryCommandv1.0.0Command to release a previously held inventory reservation. Ownerfulfilment-platformSchemaMapView docs and serves Get Stock LevelGet Stock LevelQueryv1.0.0Query to fetch the current available stock level for a product. Ownerfulfilment-platformSchemaMapView docs reads, all backed by the Inventory DatabaseInventory DatabaseContainerv1.0.0PostgreSQL database that is the system of record for stock levels and reservations.MapView docs.

Sends 2 messages

Inventory outcomes

Receives 3 messages

Inventory commands and queries

Responsibilities

AreaDescription
ReservationsHandles Reserve InventoryReserve InventoryCommandv1.0.0Command to reserve stock for the items in a checked-out cart. Ownerordering-platformSchemaMapView docs and Release InventoryRelease InventoryCommandv1.0.0Command to release a previously held inventory reservation. Ownerfulfilment-platformSchemaMapView docs.
LookupsServes Get Stock LevelGet Stock LevelQueryv1.0.0Query to fetch the current available stock level for a product. Ownerfulfilment-platformSchemaMapView docs from the Inventory DatabaseInventory DatabaseContainerv1.0.0PostgreSQL database that is the system of record for stock levels and reservations.MapView docs.
Event publishingEmits Inventory ReservedInventory ReservedEventv1.0.0Published when stock has been successfully reserved for an order. Ownerfulfilment-platformSchemaMapView docs and Inventory UnavailableInventory UnavailableEventv1.0.0Published when stock could not be reserved for an order. Ownerfulfilment-platformSchemaMapView docs.

Architecture diagram

Messages for this service

Sends messages (2)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummary
Inventory Reserved
v1.0.0eventPublished when stock has been successfully reserved for an order.
Inventory Unavailable
v1.0.0eventPublished when stock could not be reserved for an order.

Receives messages (3)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummary
Reserve Inventory
v1.0.0commandCommand to reserve stock for the items in a checked-out cart.
Release Inventory
v1.0.0commandCommand to release a previously held inventory reservation.
Get Stock Level
v1.0.0queryQuery to fetch the current available stock level for a product.
Event-driven architecture documentation: Acme Inc