Skip to main content

Event catalogue

Every Kafka message this service produces or consumes is a CloudEvents 1.0 event in structured mode: the Kafka value is the whole JSON envelope and the header content-type is application/cloudevents+json; charset=UTF-8. Envelopes are built and decoded only in internal/adapters/kafka/cloudevents (ADR 0004). The contract is apis/asyncapi.yaml; field-level detail is on Domain events.

Published​

Integration topic warehouse.pick-face-replenishment.events and analytics topic warehouse.pick-face-replenishment.analytics, source /warehouse/pick-face-replenishment, subject and Kafka key = the request id (<site_id>/<sku> for the policy event), dataschema urn:warehouse:pick-face-replenishment:<events|analytics>:<EventName>:v1. One CloudEvents id is minted per occurrence and shared by both copies.

TypeRaised byTopicsdata
com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentRequesteddetection (sweep, consumers) or POST /replenishmentsevents + analyticsrequest_id, site_id, sku, forward_bin, source_bin, quantity, priority, policy_min, policy_max, requested_at
com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCompleteda matching StockRelocatedevents + analyticsrequest_id, site_id, sku, forward_bin, source_bin, quantity, completed_at
com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCancelledcancel (operator, slot plan, policy removal)events + analyticsrequest_id, site_id, sku, reason, cancelled_at
com.warehouse.wms.pick-face-replenishment.policy.ReplenishmentPolicyDeclaredPUT /policies/{siteId}/{sku}analytics onlysite_id, sku, min_qty, max_qty, multiple, multiple_source (optional), version, declared_at

Removing a policy raises no event of its own: its open requests are cancelled with reason POLICY_REMOVED.

The analytics stream is not an integration contract: its only consumer is this service's cmd/pfr-projector (ADR 0008), which projects it into the analytical database behind GET /reports/replenishment-funnel. Dead letters go to warehouse.pick-face-replenishment.analytics.dlq. apis/asyncapi.yaml declares the twin messages on that channel.

Consumed​

TypeTopicKeyConsumer (mode / group variable)
com.warehouse.wms.inventory-storage.stock.BinStockLevelChangedwarehouse.inventory.events<bin>:<sku>inventory consumer (INVENTORY_MODE / INVENTORY_CONSUMER_GROUP)
com.warehouse.wms.inventory-storage.stock.StockRelocatedwarehouse.inventory.eventsrelocation_idinventory consumer
com.warehouse.wms.slotting-optimization.slotplan.SlotPlanApprovedwarehouse.slotting-optimization.eventsplan idslotting consumer (SLOTTING_MODE / SLOTTING_CONSUMER_GROUP)
com.warehouse.wms.facility-layout.zone.ZoneRegisteredwarehouse.facility.eventszoneIdlayout consumer (LAYOUT_MODE / LAYOUT_CONSUMER_GROUP)
com.warehouse.wms.facility-layout.locationslot.LocationSlotRegisteredwarehouse.facility.eventslocationCodelayout consumer
com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissionedwarehouse.facility.eventslocationCodelayout consumer
com.warehouse.wms.product-master.product.ProductPackLevelDeclaredwarehouse.product-master.eventsSKUproduct-master consumer (PACK_LEVEL_MODE / PACK_LEVEL_CONSUMER_GROUP)
com.warehouse.wms.product-master.product.ProductPackLevelRetiredwarehouse.product-master.eventsSKUproduct-master consumer

Eight types are consumed. Dead-letter topics are <consumed topic>.dlq for each of the four consumed topics (Runbook). Every other type on a consumed topic is ignored.

Producer status of the consumed types today (checked on each sibling's origin/develop): see Integration. In particular inventory-storage publishes BinStockLevelChanged (its ADR 0040), and its StockRelocated carries the REPLENISHMENT reason for a completed REPLENISH task (its ADR 0041).