Asynchronous event contract for the Work Planning & Release bounded context, the core domain of the WES (Warehouse Execution System) subdomain. This service is the "conductor" of the distribution centre: it turns a shift's charge (volume due by each CPT) into a committed plan (rate x heads per process path), releases work continuously and waveless-ly into per-path work pools, and performs flow balancing (Drum-Buffer-Rope, with CPT as the drum) from live buffer telemetry. It sits downstream of WMS planning/inventory and upstream of WCS equipment control.
Every message this service produces or consumes on Kafka is a
CloudEvents 1.0 structured-mode JSON document (mandatory fleet
standard, ADR-0027 — there is no flat envelope, no dual-write/dual-read
and no envelope toggle): the CloudEvents context attributes and the
event-specific data payload travel together in a single JSON body, and
every produced Kafka message carries the header
content-type: application/cloudevents+json; charset=UTF-8 next to the
W3C traceparent/tracestate headers. All of specversion (1.0),
id, source (always /warehouse/wes-work-planning), type,
subject (the aggregate instance id), time (domain occurred-at, UTC),
datacontenttype (application/json) and dataschema
(urn:warehouse:wes-work-planning:<events|analytics>:<EventName>:v1) are
required. data is described per message below.
type naming conventionThe CloudEvents type attribute follows a reverse-DNS dotted convention
shared by every bounded context in this program:
com.warehouse.<subdomain>.<bounded-context>.<entity>.<EventName>
All segments are lowercase except the final PascalCase event name, which
matches the past-tense domain event name used in the code. For this
service the subdomain is wes and the bounded context is
work-planning, so for example:
com.warehouse.wes.work-planning.workunit.WorkReleased
com.warehouse.wes.work-planning.workpool.PathCapacityChanged
The entity segment names the aggregate (or aggregate cluster) that
raises the event: workpool for the WorkPool aggregate and the flow
balancing decisions taken against it, and workunit for the WorkUnit
aggregate.
ADR-0049 handed the charge forecast and the shift plan to warehouse-planning (its ADR 0023), so these three types are no longer published on either channel and leave this contract:
com.warehouse.wes.work-planning.charge.ChargeForecastReceived
com.warehouse.wes.work-planning.plan.ShiftPlanCommitted
com.warehouse.wes.work-planning.pathplan.PathPlanDriftDetected
Both topics still hold them in their history; a consumer replaying it
must ignore them like any unknown type (this service's own analytics
projector acknowledges them without projecting).
This document is the complete catalog of the past-tense domain events
declared by this bounded context (see internal/domain/shared/events.go),
so that it is a usable reference for the whole domain model. Not every
catalogued event is emitted onto Kafka today: the outbound adapter
(internal/adapters/outbound/kafka/publisher.go) only sees the events
that application use cases actually hand to EventPublisher.Publish. Any
message that is not wired to the outbound adapter says so explicitly in
its own description. Every raised event is written to the transactional
outbox in the same transaction as the aggregate change and relayed to both
Kafka topics (ADR-0014); there is no log-only publisher
(EVENT_PUBLISHER accepts only kafka, ADR-0044).
Work Planning is unusual in this program in that it is both a producer
and a consumer of integration events. Those inbound streams are not
part of this channel and are owned by their own bounded contexts; they
are listed here only for orientation. Consumers dispatch on these exact
CloudEvents type strings (never a short name or suffix match):
com.warehouse.wes.workforce-management.shiftplan.ShiftPlanCommitted
com.warehouse.wms.inventory-storage.reservation.StockReserved
com.warehouse.wms.inventory-storage.reservation.ReservationRevoked
com.warehouse.wes.fulfillment-execution.task.TaskCompleted
com.warehouse.wes.order-management.order.OrderAllocated
com.warehouse.wes.order-management.order.OrderPartiallyAllocated
com.warehouse.wes.network-inventory-planning.workdemand.WorkDemandReleased
com.warehouse.wms.slotting-optimization.slotplan.SlotPlanApproved
com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentRequested
com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCancelled
com.warehouse.wms.product-master.product.ProductClassified
com.warehouse.wms.product-master.product.ProductPackLevelDeclared
com.warehouse.wms.product-master.product.ProductPackLevelRetired
com.warehouse.wms.product-master.product.ProductPackLevelMeasured
com.warehouse.wes.process-path-management.processpath.ProcessPathCreated
com.warehouse.wes.process-path-management.processpath.ProcessPathUpdated
com.warehouse.wes.process-path-management.processpath.ProcessPathDeactivated
A message that is not a valid CloudEvents 1.0 event (including the
retired flat envelope) is dead-lettered to <topic>.dlq by the main
consumer, or skipped with a WARN log by the catalogue and analytics
consumers — never parsed as a legacy shape. This service also consumes
ShiftPlanCommitted from workforce-management on
warehouse.workforce.events (projected into the read-only
LaborPlanObserved view, a pure projection: since ADR-0049 this context
holds no shift plan of its own), StockReserved and ReservationRevoked from inventory-storage on
warehouse.inventory.events (projected into the SKU-keyed
UsableInventoryObserved view), TaskCompleted from
fulfillment-execution on warehouse.fulfillment.events (fed into the
RecordCompletion use case to close the execution feedback loop),
OrderAllocated/OrderPartiallyAllocated from order-management on
warehouse.order-management.events (fed into the existing
EnqueueWorkUnit use case, once per order line — the event-choreography
replacement for order-management's former synchronous call to
POST /paths/{pathId}/work-units; deliberately fire-and-forget, with no
reply event published back), and WorkDemandReleased from
network-inventory-planning on
warehouse.network-inventory-planning.events (fed into the existing
EnqueueWorkUnit use case, one work unit per released transfer demand
leg under the deterministic id demand_id — see ADR-0033; also
fire-and-forget), and ProductClassified from product-master on
warehouse.product-master.events (applied to this context's local
classification copy, version-guarded, by a dedicated consumer under
PRODUCT_CLASSIFICATION_CONSUMER_GROUP; the copy is what the
WorkReleased encoder reads for its hazmat/fragile hints — see
ADR-0035), SlotPlanApproved from slotting-optimization on
warehouse.slotting-optimization.events (one RELOCATE work unit per
move on path RELOCATE, older plans' unreleased moves cancelled — see
ADR-0040), ReplenishmentRequested and ReplenishmentCancelled from
pick-face-replenishment on warehouse.pick-face-replenishment.events (one
REPLENISH work unit per request on path REPLENISH, cancelled while
still Pending — see ADR-0042), and ProductPackLevelDeclared,
ProductPackLevelRetired and ProductPackLevelMeasured from
product-master on warehouse.product-master.events (applied to the local
pack-level copy under PACK_VIEW_CONSUMER_GROUP — see ADR-0045). All
consumer paths are idempotent under
at-least-once redelivery: the CloudEvents id is recorded as processed
in the SAME transaction as the event's effect (ADR-0028), so a failed
attempt is retried and, once retries are exhausted, dead-lettered to
<topic>.dlq — never acknowledged as already processed. A TaskCompleted
whose work_unit_id names a work unit this context never planned (e.g.
a PACK task fulfillment-execution created during rebin consolidation,
which carries the order id) is a deliberate, INFO-logged skip: it is
marked processed and neither retried nor dead-lettered. So is a
TaskCompleted with a NEW event id for a work unit that is already
completed (TaskCompletedAlreadyCompleted, ADR-0043): a stale fact,
marked processed, neither retried nor dead-lettered.
Production Kafka cluster shared by every warehouse-systems bounded context. Locally, a broker is available at localhost:9092 via ~/warehouse-systems/docker-compose.kafka.yml.
The outbound topic owned by the Work Planning & Release bounded context (cloudevents.TopicWorkPlanningEvents in the code). Every domain event this service emits is written here as a CloudEvents 1.0 event with dataschema urn:warehouse:wes-work-planning:events:<EventName>:v1, keyed by the aggregate id (the CloudEvents subject: work unit id for WorkUnit events, path id otherwise).
Consume domain events emitted by WES Work Planning & Release.
Subscribe to this channel to receive every past-tense domain event raised by the Work Planning & Release bounded context. Messages are CloudEvents 1.0 structured-mode JSON. Consumers must be idempotent: delivery is at-least-once, and the CloudEvents id attribute is the de-duplication key. Consumers should also ignore type values they do not recognise, since new event types may be added to this channel without a major version bump.
Available only on servers:
Accepts one of the following messages:
A new work unit was enqueued into a path's work pool.
Raised by the WorkUnit aggregate when EnqueueWorkUnit admits a new releasable unit of work (carrying its CPT) into the process path's work pool. The unit is queued, not yet released. Actively published to warehouse.work-planning.events; the published data carries path_id and work_unit_id.
CloudEvent envelope for a newly enqueued work unit.
A pick task was enqueued into the pick-to-tote pool.
{
"specversion": "1.0",
"id": "c25b9f83-7e64-4a19-b8d2-0f5a3c6e1b47",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workunit.WorkUnitCreated",
"subject": "wu-10231",
"time": "2026-08-21T22:10:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:WorkUnitCreated:v1",
"data": {
"path_id": "pick-to-tote",
"work_unit_id": "wu-10231"
}
}
The release policy admitted a work unit into active work.
Raised by the WorkPool aggregate when ReleaseNextWork applies the release policy and admits the highest-priority (earliest-CPT) queued work unit into active work. This is the primary integration event of this bounded context: fulfillment-execution consumes it and turns it into a Task. Actively published to warehouse.work-planning.events. The outbound adapter enriches the data payload with the unit's cpt and ref by reading the WorkUnit repository, since the domain event itself only carries the identifiers. When the released unit carries a known SKU, the adapter also reads that SKU's classification from this context's local copy of product-master's ProductClassified events (ADR-0035; previously a synchronous read from inventory-storage, ADR-0009) and stamps two OPTIONAL derived fields, required_capabilities and fragile, present only when there is a hint to give. It also stamps the OPTIONAL line_no — the order line the unit was made for, stored on the WorkUnit from the OrderAllocated line that created it (ADR-0036) — omitted when unknown. The same line_no rides on the analytics-stream WorkReleased (warehouse.wes.analytics).
CloudEvent envelope for a work unit admitted into active work by the release policy.
A pick task was released into the pick-to-tote path.
{
"specversion": "1.0",
"id": "1d7e4b90-3c58-4d22-9a6f-8b1c0e5d7a23",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workunit.WorkReleased",
"subject": "wu-10231",
"time": "2026-08-21T22:12:30Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:WorkReleased:v1",
"data": {
"path_id": "pick-to-tote",
"work_unit_id": "wu-10231",
"cpt": "2026-08-22T02:00:00Z",
"ref": "order-88421-line-3"
}
}
The line-3 pick task of an order was released; line_no states the line explicitly (ADR-0036).
{
"specversion": "1.0",
"id": "3f9a6d12-5e84-4b60-8c17-0a2d4e6f8b35",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workunit.WorkReleased",
"subject": "order-88421-line-3",
"time": "2026-08-21T22:12:45Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:WorkReleased:v1",
"data": {
"path_id": "pick-to-tote",
"work_unit_id": "order-88421-line-3",
"cpt": "2026-08-22T02:00:00Z",
"ref": "order-88421",
"line_no": 3
}
}
A pick task for a SKU classified both Hazmat and Fragile in inventory-storage was released; both optional hints are present.
{
"specversion": "1.0",
"id": "2e8f5c01-4d69-4e33-a057-9c2d1f6b8354",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workunit.WorkReleased",
"subject": "wu-10232",
"time": "2026-08-21T22:13:05Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:WorkReleased:v1",
"data": {
"path_id": "pick-to-tote",
"work_unit_id": "wu-10232",
"cpt": "2026-08-22T02:05:00Z",
"ref": "order-88421-line-4",
"required_capabilities": [
"hazmat"
],
"fragile": true
}
}
A RELOCATE move of an approved slot plan was released (ADR-0040); fulfillment-execution turns it into a RELOCATE task.
{
"specversion": "1.0",
"id": "11111111-1111-4111-8111-111111111111",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workunit.WorkReleased",
"subject": "plan-3b0e8d2a-move-1",
"time": "2026-10-15T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:WorkReleased:v1",
"data": {
"path_id": "RELOCATE",
"work_unit_id": "plan-3b0e8d2a-move-1",
"cpt": "2026-10-16T08:00:00Z",
"ref": "plan-3b0e8d2a",
"relocation": {
"plan_id": "plan-3b0e8d2a",
"move_seq": 1,
"kind": "Relocate",
"sku": "SKU-2",
"from_bin": "WH1-FWD-A02-03-01-A",
"to_bin": "WH1-FWD-A01-01-02-A"
}
}
}
A URGENT pick-face replenishment was released on the REPLENISH path (ADR-0042); fulfillment-execution turns it into a REPLENISH task (its ADR 0050).
{
"specversion": "1.0",
"id": "11111111-1111-4111-8111-111111111111",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workunit.WorkReleased",
"subject": "replenish-repl-9c2f6b1e-5d3a-4e8b-a7f0-1b2c3d4e5f60",
"time": "2026-10-17T09:45:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:WorkReleased:v1",
"data": {
"path_id": "REPLENISH",
"work_unit_id": "replenish-repl-9c2f6b1e-5d3a-4e8b-a7f0-1b2c3d4e5f60",
"cpt": "2026-10-17T10:30:00Z",
"ref": "repl-9c2f6b1e-5d3a-4e8b-a7f0-1b2c3d4e5f60",
"replenishment": {
"request_id": "repl-9c2f6b1e-5d3a-4e8b-a7f0-1b2c3d4e5f60",
"sku": "SKU-2",
"from_bin": "WH1-RSV-A07-03-02-B",
"to_bin": "WH1-FWD-A01-01-02-A",
"quantity": 6,
"priority": "URGENT"
}
}
}
A released work unit finished.
Raised by the WorkUnit aggregate when RecordCompletion marks a released unit as done — either from the REST endpoint or from a TaskCompleted event consumed off warehouse.fulfillment.events. The aggregate refuses a double-complete. Actively published to warehouse.work-planning.events; the published data carries path_id and work_unit_id.
CloudEvent envelope for a completed work unit.
A pick task completed on the pick-to-tote path.
{
"specversion": "1.0",
"id": "6b0f2d47-1a93-4e75-8c3b-2d9e6f4a1c58",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workunit.WorkUnitCompleted",
"subject": "wu-10231",
"time": "2026-08-21T22:19:45Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:WorkUnitCompleted:v1",
"data": {
"path_id": "pick-to-tote",
"work_unit_id": "wu-10231"
}
}
A path's backlog depth crossed its alarm threshold.
Raised by the WorkPool aggregate when SampleBacklog observes that the pool's backlog depth has crossed the alarm threshold — the buffer signal that drives flow balancing. Actively published to warehouse.work-planning.events; the published data carries only path_id. Consumers wanting the depth and rate numbers should read the telemetry projection over REST rather than infer them here.
CloudEvent envelope for a backlog alarm threshold breach.
The pack-singles buffer went over its alarm threshold.
{
"specversion": "1.0",
"id": "9c4a1e60-8b72-4d31-a5f9-7e2c3b0d6f18",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workpool.BacklogThresholdBreached",
"subject": "pack-singles",
"time": "2026-08-21T22:25:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:BacklogThresholdBreached:v1",
"data": {
"path_id": "pack-singles"
}
}
A path's actual throughput deviated materially from plan.
Reserved: declared for a future detection rule (ADR 0020 defers it); not emitted today. Decided 2026-10-06: kept declared, neither emitted nor removed. Re-checked 2026-10-12 (gap fix D26): no ADR defines when it is raised, so it stays reserved; the architecture fitness test TestRateDeviationDetectedStaysReserved fails if production code starts raising it without that ADR.
Raised when a process path's observed throughput diverges materially from the rate committed in its PathPlan — the plan-vs-actual signal for flow balancing. Not yet wired to the outbound Kafka adapter — documented here as part of the domain-event catalog, in-process only today. The event type is declared in internal/domain/shared/events.go and the publisher's payload switch already handles it, but no application use case currently raises it, so nothing is emitted onto the topic. The example below shows the shape it would take once wired.
CloudEvent envelope for a plan-vs-actual rate deviation. Catalog-only today — no use case currently raises this event.
Actual rate on pick-to-tote drifted away from plan.
{
"specversion": "1.0",
"id": "2e8b5c34-6f19-4a07-9d52-1c7a4e3b8f60",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workpool.RateDeviationDetected",
"subject": "pick-to-tote",
"time": "2026-08-21T22:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:RateDeviationDetected:v1",
"data": {
"path_id": "pick-to-tote"
}
}
Flow balancing decided to throttle upstream release into a path.
Raised by RebalanceDecision when a flow-fed pool is over its alarm threshold and the recommendation is to throttle upstream release — the rope in Drum-Buffer-Rope pulling back on a saturated buffer. Actively published to warehouse.work-planning.events; the published data carries only path_id.
CloudEvent envelope for an upstream release throttle decision.
Upstream release into pack-singles was throttled.
{
"specversion": "1.0",
"id": "7f3c8a25-4d16-4b93-8e07-5a2b9c1d4e73",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workpool.PathThrottled",
"subject": "pack-singles",
"time": "2026-08-21T22:31:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:PathThrottled:v1",
"data": {
"path_id": "pack-singles"
}
}
Flow balancing recommended moving labor to relieve a path.
Raised by RebalanceDecision when a release-fed pool is at its WIP limit with backlog still queued: releasing more work cannot help, so the recommendation is to move heads onto the path instead. Actively published to warehouse.work-planning.events; the published data carries only path_id. Workforce Management is the intended reader.
CloudEvent envelope for a labor reassignment recommendation.
Labor reassignment recommended for pick-to-tote.
{
"specversion": "1.0",
"id": "3a9d7e52-0c48-4f61-b2d8-6e4c1a5b9f27",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workpool.LaborReassignmentFlagged",
"subject": "pick-to-tote",
"time": "2026-08-21T22:33:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:LaborReassignmentFlagged:v1",
"data": {
"path_id": "pick-to-tote"
}
}
This service reported a process path's remaining admission capacity for a specific CPT cutoff window.
Raised when SampleBacklog is asked (via the optional cutoffAt query parameter on GET /paths/{pathId}/telemetry, see ADR-0018) to report the path's currently remaining admission capacity, correlated against a CPT cutoff timestamp. This PUBLISHES state this service already tracks on its own WorkPool aggregate (wipLimit minus current WIP) — it introduces no new domain concept or per-CPT capacity bucket. known is false for a FlowFed path (no hard admission ceiling — only an alarm threshold, which is not a capacity figure) or a ReleaseFed path with no WIP limit provisioned; when known is false, remaining_units is always 0.
cutoff_at is this service's own native CPT currency (a concrete RFC3339 timestamp), not process-path-management's site-schedule cptId string, which this service has zero dependency on. A future order-management consumer is responsible for correlating cutoff_at against its own cached CPTWindow.CutoffAt (exact match or nearest- window match) to resolve which cptId this figure applies to — see ADR-0018 for the full correlation-by-timestamp design and its accepted imprecision trade-off. Actively published to warehouse.work-planning.events.
CloudEvent envelope for a reported remaining-admission-capacity figure for a process path, correlated against a CPT cutoff timestamp (see ADR-0018).
pick-to-tote (ReleaseFed, WIP limit 40, WIP 23) reports 17 remaining units of admission capacity for the 02:00 UTC cutoff.
{
"specversion": "1.0",
"id": "5c7d3f92-1b64-4a08-9e73-2f6a8c1d5b40",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workpool.PathCapacityChanged",
"subject": "pick-to-tote",
"time": "2026-08-21T22:40:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:PathCapacityChanged:v1",
"data": {
"path_id": "pick-to-tote",
"cutoff_at": "2026-08-22T02:00:00Z",
"remaining_units": 17,
"known": true
}
}
pack-singles is FlowFed (no hard admission ceiling), so capacity is reported as unknown rather than derived from its alarm threshold.
{
"specversion": "1.0",
"id": "6d8e4a03-2c75-4b19-8f84-3a7b9d2e6c51",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workpool.PathCapacityChanged",
"subject": "pack-singles",
"time": "2026-08-21T22:41:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:PathCapacityChanged:v1",
"data": {
"path_id": "pack-singles",
"cutoff_at": "2026-08-22T03:00:00Z",
"remaining_units": 0,
"known": false
}
}
The internal analytics topic (ADR-0011) feeding this service's own throughput data product (cmd/wes-projector). Same occurrences, same CloudEvents type per occurrence as the integration topic, but the analytics payload shape, identified by dataschema urn:warehouse:wes-work-planning:analytics:<EventName>:v1 (this replaces the retired schema_version field). Keyed by the aggregate id (work unit id or path id), which is also the CloudEvents subject.
Consume the work-planning analytics stream.
Subscribe to receive the analytics-shaped CloudEvents for every occurrence in the throughput data product's contract. Delivery is at-least-once; the CloudEvents id is the de-duplication key, and unknown type values must be ignored.
Available only on servers:
Accepts one of the following messages:
Analytics-shaped WorkUnitCreated occurrence on warehouse.wes.analytics.
A pick task was enqueued into the pick-to-tote pool (analytics stream).
{
"specversion": "1.0",
"id": "2d68a704-5a03-467b-a956-522f9ae1ef87",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workunit.WorkUnitCreated",
"subject": "wu-10231",
"time": "2026-08-21T22:10:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:analytics:WorkUnitCreated:v1",
"data": {
"path_id": "pick-to-tote",
"work_unit_id": "wu-10231"
}
}
Analytics-shaped WorkReleased occurrence on warehouse.wes.analytics.
The line-3 pick task of an order was released (analytics stream).
{
"specversion": "1.0",
"id": "4a6c8e10-2b3d-4f57-9a81-6c0d2e4f7b93",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workunit.WorkReleased",
"subject": "order-88421-line-3",
"time": "2026-08-21T22:12:30Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:analytics:WorkReleased:v1",
"data": {
"path_id": "pick-to-tote",
"work_unit_id": "order-88421-line-3",
"line_no": 3
}
}
Analytics-shaped WorkUnitCompleted occurrence on warehouse.wes.analytics.
A pick task completed on the pick-to-tote path (analytics stream).
{
"specversion": "1.0",
"id": "ccc098ff-c787-4ef6-b389-80ffb28a7d4d",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workunit.WorkUnitCompleted",
"subject": "wu-10231",
"time": "2026-08-21T22:19:45Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:analytics:WorkUnitCompleted:v1",
"data": {
"path_id": "pick-to-tote",
"work_unit_id": "wu-10231"
}
}
Analytics-shaped BacklogThresholdBreached occurrence on warehouse.wes.analytics.
The pack-singles buffer went over its alarm threshold (analytics stream).
{
"specversion": "1.0",
"id": "eb2e362b-313e-4016-a0f7-f64b73c8fc73",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workpool.BacklogThresholdBreached",
"subject": "pack-singles",
"time": "2026-08-21T22:25:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:analytics:BacklogThresholdBreached:v1",
"data": {
"path_id": "pack-singles"
}
}
Analytics-shaped RateDeviationDetected occurrence on warehouse.wes.analytics.
Reserved: declared for a future detection rule (ADR 0020 defers it); not emitted today. No ADR defines when a rate deviation is raised, so no use case raises it (an architecture fitness test, TestRateDeviationDetectedStaysReserved, fails if production code starts to). The projector still counts it, so the report's rateDeviationDetected column is always 0 until a rule is decided.
Actual rate on pick-to-tote drifted away from plan (analytics stream).
{
"specversion": "1.0",
"id": "184eeee4-fe00-45d3-bdb6-544cf2ddb68c",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workpool.RateDeviationDetected",
"subject": "pick-to-tote",
"time": "2026-08-21T22:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:analytics:RateDeviationDetected:v1",
"data": {
"path_id": "pick-to-tote"
}
}
Analytics-shaped PathThrottled occurrence on warehouse.wes.analytics.
Upstream release into pack-singles was throttled (analytics stream).
{
"specversion": "1.0",
"id": "842a8b9b-3d64-474d-8bd9-1ad9e0f08bcf",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workpool.PathThrottled",
"subject": "pack-singles",
"time": "2026-08-21T22:31:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:analytics:PathThrottled:v1",
"data": {
"path_id": "pack-singles"
}
}
Analytics-shaped LaborReassignmentFlagged occurrence on warehouse.wes.analytics.
Labor reassignment recommended for pick-to-tote (analytics stream).
{
"specversion": "1.0",
"id": "142d3c1c-2669-442e-afce-d4f1ae91f17e",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workpool.LaborReassignmentFlagged",
"subject": "pick-to-tote",
"time": "2026-08-21T22:33:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:analytics:LaborReassignmentFlagged:v1",
"data": {
"path_id": "pick-to-tote"
}
}
Analytics-shaped PathCapacityChanged occurrence on warehouse.wes.analytics.
pick-to-tote (ReleaseFed, WIP limit 40, WIP 23) reports 17 remaining units of admission capacity for the 02:00 UTC cutoff (analytics stream).
{
"specversion": "1.0",
"id": "28b0b164-7eb3-4aba-aac1-d7498b344ed4",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workpool.PathCapacityChanged",
"subject": "pick-to-tote",
"time": "2026-08-21T22:40:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:analytics:PathCapacityChanged:v1",
"data": {
"path_id": "pick-to-tote",
"cutoff_at": "2026-08-22T02:00:00Z",
"remaining_units": 17,
"known": true
}
}
workforce-management's integration topic, CONSUMED by this service (owned by that bounded context; listed here read-only for orientation). Read by the main consumer under KAFKA_CONSUMER_GROUP with a warehouse.workforce.events.dlq. Only ShiftPlanCommitted is consumed; every other type is ignored.
Project workforce-management's ShiftPlanCommitted into the LaborPlanObserved view.
ObserveLaborPlan upserts the read-only LaborPlanObserved view keyed by path_id (served by GET /paths/{pathId}/labor-plan-view). It is a pure projection: this service holds no plan of its own to reconcile it with (ADR-0049 moved the ADR-0019 drift check to warehouse-planning). The CloudEvents id is claimed in the same transaction as the effect. A message that is not a valid CloudEvent is published raw to the DLQ without retry.
Available only on servers:
Accepts the following message:
workforce-management committed a shift plan for a path.
CONSUMED from warehouse.workforce.events, read-only mirror of the producer's contract. Not the retired com.warehouse.wes.work-planning.plan.ShiftPlanCommitted this service used to publish (ADR-0049).
Read-only mirror of workforce-management's ShiftPlanCommitted; this service consumes it and never publishes it. Only the fields this service decodes are listed.
{
"specversion": "1.0",
"id": "7c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5",
"source": "/warehouse/workforce-management",
"type": "com.warehouse.wes.workforce-management.shiftplan.ShiftPlanCommitted",
"subject": "pick-a",
"time": "2026-10-06T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:workforce-management:events:ShiftPlanCommitted:v1",
"data": {
"building_id": "WH1",
"shift_id": "shift-2026-10-06-day",
"path_id": "pick-a",
"planned_heads": 6,
"planned_rate": 95.5,
"planned_hours": 8
}
}
fulfillment-execution's integration topic, CONSUMED by this service (owned by that bounded context; listed here read-only for orientation). Read by the main consumer under KAFKA_CONSUMER_GROUP with a warehouse.fulfillment.events.dlq. Only TaskCompleted is consumed.
Close the execution feedback loop by completing the named work unit.
ApplyTaskCompleted wraps RecordCompletion for the event's work_unit_id. A work_unit_id this context never planned (for example a PACK task created during rebin consolidation, which carries the order id) is an INFO-logged, processed skip; a NEW event id for an already-completed work unit is a stale fact, marked processed (ADR-0043). Neither is retried or dead-lettered. Any other failure is retried and then dead-lettered.
Available only on servers:
Accepts the following message:
fulfillment-execution finished a task.
CONSUMED from warehouse.fulfillment.events, read-only mirror of the producer's contract. Drives RecordCompletion for work_unit_id.
Read-only mirror of fulfillment-execution's TaskCompleted; this service consumes it and never publishes it. Only the fields this service decodes are listed.
{
"specversion": "1.0",
"id": "7c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5",
"source": "/warehouse/fulfillment-execution",
"type": "com.warehouse.wes.fulfillment-execution.task.TaskCompleted",
"subject": "task-1",
"time": "2026-10-06T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:fulfillment-execution:events:TaskCompleted:v1",
"data": {
"task_id": "task-1",
"station_id": "station-7",
"work_unit_id": "order-77213-line-1",
"task_type": "PICK"
}
}
order-management's integration topic, CONSUMED by this service (owned by that bounded context; listed here read-only for orientation). Read by the main consumer under KAFKA_CONSUMER_GROUP with a warehouse.order-management.events.dlq. Only OrderAllocated and OrderPartiallyAllocated are consumed (identical payload shape).
Enqueue one work unit per allocated order line.
ApplyOrderAllocated feeds each line into EnqueueWorkUnit under the deterministic id <order_id>-line-<line_no> (reference = order id, lineNo = line_no, ADR-0031, ADR-0036). Fire-and-forget: no reply event is published. The CloudEvents id is claimed in the same transaction as the enqueue; a failure is retried and then dead-lettered.
Available only on servers:
Accepts one of the following messages:
order-management allocated an order; its lines are ready to enqueue.
CONSUMED from warehouse.order-management.events, read-only mirror of the producer's contract. One work unit is enqueued per line.
Read-only mirror of order-management's OrderAllocated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
{
"specversion": "1.0",
"id": "7c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5",
"source": "/warehouse/order-management",
"type": "com.warehouse.wes.order-management.order.OrderAllocated",
"subject": "order-77213",
"time": "2026-10-06T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:order-management:events:OrderAllocated:v1",
"data": {
"order_id": "order-77213",
"promise_date": "2026-10-08T00:00:00Z",
"lines": [
{
"line_no": 1,
"sku": "sku-482910",
"path_id": "pick-a",
"gift_wrap": false
}
]
}
}
order-management partially allocated an order; the allocated lines are ready to enqueue.
CONSUMED from warehouse.order-management.events, read-only mirror of the producer's contract. Identical payload shape to OrderAllocated; handled identically.
Read-only mirror of order-management's OrderPartiallyAllocated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
{
"specversion": "1.0",
"id": "7c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5",
"source": "/warehouse/order-management",
"type": "com.warehouse.wes.order-management.order.OrderPartiallyAllocated",
"subject": "order-77213",
"time": "2026-10-06T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:order-management:events:OrderPartiallyAllocated:v1",
"data": {
"order_id": "order-77213",
"promise_date": "2026-10-08T00:00:00Z",
"lines": [
{
"line_no": 1,
"sku": "sku-482910",
"path_id": "pick-a",
"gift_wrap": false
}
]
}
}
process-path-management's integration topic, CONSUMED by this service only when PATH_CATALOGUE_SOURCE=kafka (owned by that bounded context; listed here read-only for orientation). Replayed from the earliest offset under a per-process consumer group (NOT KAFKA_CONSUMER_GROUP) into the in-memory process-path catalogue (ADR-0012). With the default PATH_CATALOGUE_SOURCE=file nothing is read from this topic.
Keep the process-path catalogue current.
ProcessPathCreated and ProcessPathUpdated upsert a path definition; ProcessPathDeactivated removes it. Invalid CloudEvents are WARN-logged and skipped; unknown types are ignored. No DLQ.
Available only on servers:
Accepts one of the following messages:
process-path-management created a process path.
CONSUMED from warehouse.process-path-management.events only with PATH_CATALOGUE_SOURCE=kafka, read-only mirror of the producer's contract.
Read-only mirror of process-path-management's ProcessPathCreated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
{
"specversion": "1.0",
"id": "7c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5",
"source": "/warehouse/process-path-management",
"type": "com.warehouse.wes.process-path-management.processpath.ProcessPathCreated",
"subject": "pick-a",
"time": "2026-10-06T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:process-path-management:events:ProcessPathCreated:v1",
"data": {
"path_id": "pick-a",
"match_prefix": "pick",
"direct": true,
"required_capabilities": [],
"intake": [
"ORDER"
]
}
}
process-path-management updated a process path.
CONSUMED from warehouse.process-path-management.events only with PATH_CATALOGUE_SOURCE=kafka, read-only mirror of the producer's contract.
Read-only mirror of process-path-management's ProcessPathUpdated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
{
"specversion": "1.0",
"id": "7c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5",
"source": "/warehouse/process-path-management",
"type": "com.warehouse.wes.process-path-management.processpath.ProcessPathUpdated",
"subject": "pick-a",
"time": "2026-10-06T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:process-path-management:events:ProcessPathUpdated:v1",
"data": {
"path_id": "pick-a",
"match_prefix": "pick",
"direct": true,
"required_capabilities": [],
"intake": [
"ORDER"
]
}
}
process-path-management deactivated a process path.
CONSUMED from warehouse.process-path-management.events only with PATH_CATALOGUE_SOURCE=kafka, read-only mirror of the producer's contract.
Read-only mirror of process-path-management's ProcessPathDeactivated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
{
"specversion": "1.0",
"id": "7c1d2e3f-4a5b-4c6d-8e7f-90a1b2c3d4e5",
"source": "/warehouse/process-path-management",
"type": "com.warehouse.wes.process-path-management.processpath.ProcessPathDeactivated",
"subject": "pick-a",
"time": "2026-10-06T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:process-path-management:events:ProcessPathDeactivated:v1",
"data": {
"path_id": "pick-a",
"match_prefix": "pick",
"direct": true,
"required_capabilities": [],
"intake": [
"ORDER"
]
}
}
network-inventory-planning's integration topic, CONSUMED by this service (owned by that bounded context; listed here read-only for orientation, mirroring its own apis/asyncapi.yaml). This service consumes only WorkDemandReleased and ignores every other type.
Consume network-inventory-planning's released transfer work demands.
Subscribe to receive WorkDemandReleased — one leg of an approved inter-site transfer that the network has released for warehouse execution. Messages are CloudEvents 1.0 structured-mode JSON (dataschema urn:warehouse:network-inventory-planning:events:WorkDemandReleased:v1) keyed by demand_id. Each demand is fed into ApplyWorkDemandReleased and becomes exactly one work unit under the deterministic id demand_id (ADR-0033), so redelivery is idempotent. An unknown path_id or work_kind fails loud and is dead-lettered to <topic>.dlq.
Available only on servers:
Accepts the following message:
network-inventory-planning released a transfer work demand leg.
CONSUMED from warehouse.network-inventory-planning.events — this entry mirrors the producer's own contract read-only and is NOT published by this service. One occurrence = one released transfer demand leg. ApplyWorkDemandReleased validates path_id against the process-path catalogue and work_kind against the declared enum, then enqueues exactly one work unit with the deterministic id demand_id and ref = demand_id (ADR-0033). Redelivery of the same CloudEvents id, or a different event carrying a demand_id already in a pool, is a benign no-op.
CloudEvent envelope of network-inventory-planning's released transfer work demand, mirrored read-only from the producer's own contract. This service consumes it; it never publishes it.
A transfer pick leg was released for execution.
{
"specversion": "1.0",
"id": "5a1e8d42-9c47-4b58-a1f6-3d8b9e0c4a71",
"source": "/warehouse/network-inventory-planning",
"type": "com.warehouse.wes.network-inventory-planning.workdemand.WorkDemandReleased",
"subject": "demand-55601",
"time": "2026-10-06T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:network-inventory-planning:events:WorkDemandReleased:v1",
"data": {
"demand_id": "demand-55601",
"work_kind": "TRANSFER_PICK",
"transfer_ref": "TRF-2026-042",
"path_id": "pick-transfer-a",
"site_id": "site-north-1",
"cpt": "2026-10-06T23:00:00Z",
"sku": "SKU-T1",
"quantity": 17
}
}
slotting-optimization's integration topic, CONSUMED by this service (owned by that bounded context; listed here read-only for orientation, mirroring its own apis/asyncapi.yaml). Key = the plan id. This service consumes only SlotPlanApproved and ignores SlotPlanGenerated, SlotPlanRejected and every other type (ADR-0040).
Consume approved slot plans and plan their moves as RELOCATE work.
Read under the shared consumer group with its own warehouse.slotting-optimization.events.dlq. Each SlotPlanApproved becomes one RELOCATE work unit per move (id <plan_id>-move-<seq>, seq = 0-based position in moves, ref = plan_id, path RELOCATE whose catalogue intake must admit SLOT_RELOCATION). A move into a slot that another move of the same plan vacates is held out of the pool until that move's unit completes. A newer approved plan for the same site cancels the older plan's not-yet-released units; released work runs to completion; an older or duplicate plan is a no-op. The CloudEvents id is claimed in the same transaction (redelivery is a no-op). A malformed plan, an unknown move kind or an intake without SLOT_RELOCATION is retried and then dead-lettered; a message interrupted by shutdown is never dead-lettered.
Available only on servers:
Accepts the following message:
slotting-optimization approved a slot plan for a site.
CONSUMED from warehouse.slotting-optimization.events — this entry mirrors the producer's own contract (SlotPlanApprovedEvent) read-only and is NOT published by this service. Only plan_id, site_id, approved_at, supersedes_plan_id and moves are read; assignments is ignored (ADR-0040).
Mirror of slotting-optimization's SlotPlanApprovedEvent (read-only).
A plan with one Assign, one Relocate and one Vacate.
{
"specversion": "1.0",
"id": "0b9a8c7d-6e5f-4a3b-9c2d-1e0f9a8b7c6d",
"source": "/warehouse/slotting-optimization",
"type": "com.warehouse.wms.slotting-optimization.slotplan.SlotPlanApproved",
"subject": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-08T12:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:slotting-optimization:events:SlotPlanApproved:v1",
"data": {
"plan_id": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "SITE-1",
"approved_at": "2026-10-08T12:30:00Z",
"supersedes_plan_id": "plan-8e7d6c5b-4a39-4281-b0c9-d8e7f6a5b4c3",
"assignments": [
{
"sku": "SKU-1",
"slot": "WH1-FWD-A01-01-01-A"
}
],
"moves": [
{
"sku": "SKU-1",
"to_slot": "WH1-FWD-A01-01-01-A",
"kind": "Assign"
},
{
"sku": "SKU-2",
"from_slot": "WH1-FWD-A02-03-01-A",
"to_slot": "WH1-FWD-A01-01-02-A",
"kind": "Relocate"
},
{
"sku": "SKU-3",
"from_slot": "WH1-FWD-A01-01-03-A",
"kind": "Vacate"
}
]
}
}
pick-face-replenishment's integration topic, CONSUMED by this service (owned by that bounded context; listed here read-only for orientation, mirroring its own apis/asyncapi.yaml). Key = the request id. This service consumes only ReplenishmentRequested and ReplenishmentCancelled and ignores ReplenishmentCompleted and every other type (ADR-0042).
Consume replenishment requests and plan them as REPLENISH work.
A dedicated consumer reads this topic under the stable consumer group REPLENISHMENT_CONSUMER_GROUP (REPLENISHMENT_MODE unset or kafka; permissive/off are boot errors, ADR-0044) with its own warehouse.pick-face-replenishment.events.dlq. Each ReplenishmentRequested becomes exactly ONE REPLENISH work unit (id replenish-<request_id>, ref = request_id, path REPLENISH, released with the additive replenishment object of WorkReleased); a redelivery of the same CloudEvents id, or a second DIFFERENT event for an already-planned request id, is a no-op. ReplenishmentCancelled cancels the request's unit only while it is still Pending (not yet released); released or completed work runs to completion, and a cancellation for an unknown request is a no-op. The CloudEvents id is claimed in the same transaction as the effect. Invalid CloudEvents (including the retired flat envelope) are WARN-logged and skipped; a payload that can never be applied is dead-lettered at once, any other failure is retried and then dead-lettered; a message interrupted by shutdown is never dead-lettered, and the offset is committed only after success.
Available only on servers:
Accepts one of the following messages:
pick-face-replenishment asked for stock to be moved to a forward pick face.
CONSUMED from warehouse.pick-face-replenishment.events — this entry mirrors the producer's own contract (ReplenishmentRequestedEvent) read-only and is NOT published by this service. request_id, site_id, sku, source_bin (the reserve bin, becomes from_bin), forward_bin (the pick face, becomes to_bin), quantity, priority and requested_at are read; policy_min and policy_max are ignored (ADR-0042).
Mirror of pick-face-replenishment's ReplenishmentRequestedEvent (read-only).
24 units of SKU-1 from a reserve bin to its forward bin.
{
"specversion": "1.0",
"id": "6f1d2c3b-4a5e-4b7c-8d9e-0a1b2c3d4e5f",
"source": "/warehouse/pick-face-replenishment",
"type": "com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentRequested",
"subject": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-17T09:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:pick-face-replenishment:events:ReplenishmentRequested:v1",
"data": {
"request_id": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "WH1",
"sku": "SKU-1",
"forward_bin": "WH1-FWD-A01-01-01-A",
"source_bin": "WH1-RSV-A07-03-02-B",
"quantity": 24,
"priority": "NORMAL",
"policy_min": 10,
"policy_max": 60,
"requested_at": "2026-10-17T09:30:00Z"
}
}
pick-face-replenishment cancelled an open replenishment request.
CONSUMED from warehouse.pick-face-replenishment.events — this entry mirrors the producer's own contract (ReplenishmentCancelledEvent) read-only and is NOT published by this service. Only request_id is needed to find the unit; reason is carried for logs (ADR-0042).
Mirror of pick-face-replenishment's ReplenishmentCancelledEvent (read-only).
Cancelled because the slot plan moved the SKU to another forward bin.
{
"specversion": "1.0",
"id": "4d3c2b1a-0f9e-4d8c-8b7a-6f5e4d3c2b1a",
"source": "/warehouse/pick-face-replenishment",
"type": "com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCancelled",
"subject": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-17T09:50:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:pick-face-replenishment:events:ReplenishmentCancelled:v1",
"data": {
"request_id": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "WH1",
"sku": "SKU-1",
"reason": "ASSIGNMENT_CHANGED",
"cancelled_at": "2026-10-17T09:50:00Z"
}
}
product-master's integration topic, CONSUMED by this service (owned by that bounded context; listed here read-only for orientation, mirroring its own apis/asyncapi.yaml). Key = the SKU. This service consumes only ProductClassified (ADR-0035) and the pack-level types ProductPackLevelDeclared, ProductPackLevelRetired and ProductPackLevelMeasured into the local PackView (ADR-0045), and ignores every other type on the topic (ProductRegistered, ProductDescriptionChanged, ProductDimensionsDeclared, ProductMeasured). A second consumer reads this topic under the STABLE PACK_VIEW_CONSUMER_GROUP (mandatory; it must differ from PRODUCT_CLASSIFICATION_CONSUMER_GROUP, because a group that already committed past the pack events could never replay them).
Consume product-master's ProductClassified into the local classification copy.
A dedicated consumer reads this topic under the stable consumer group PRODUCT_CLASSIFICATION_CONSUMER_GROUP (only with PRODUCT_CLASSIFICATION_MODE=kafka) and keeps one row per SKU in product_classification_copy. It claims the CloudEvents id and applies the classification in ONE transaction, overwriting a stored row only when the incoming version is greater (an equal or older version is a no-op). Invalid CloudEvents and invalid payloads are WARN-logged and skipped; transient failures retry the same message and the offset is committed only after success.
Available only on servers:
Accepts one of the following messages:
product-master set or replaced a SKU's handling classification.
CONSUMED from warehouse.product-master.events — this entry mirrors the producer's own contract read-only and is NOT published by this service. A full-state replacement of one SKU's classification at the producer's aggregate version; temperature_class and dot_hazard_class are omitted when unset. Applied to the local product_classification_copy only when version is greater than the stored one (ADR-0035); classification_source is ignored. The WorkReleased encoder maps Hazmat to required_capabilities: ["hazmat"] and Fragile to fragile: true.
CloudEvent envelope of product-master's ProductClassified, mirrored read-only from the producer's own contract. This service consumes it; it never publishes it.
SKU-1 classified Hazmat + TemperatureSensitive (Frozen), DOT class 3.
{
"specversion": "1.0",
"id": "0f6d8a2b-3c4e-4d5f-8a9b-7c6d5e4f3a2b",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductClassified",
"subject": "SKU-1",
"time": "2026-10-06T21:02:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductClassified:v1",
"data": {
"sku": "SKU-1",
"handling_tags": [
"Hazmat",
"TemperatureSensitive"
],
"temperature_class": "Frozen",
"dot_hazard_class": 3,
"classification_source": "native",
"version": 3
}
}
product-master declared or revised a pack level of a SKU.
CONSUMED from warehouse.product-master.events - this entry mirrors the producer's own contract read-only and is NOT published by this service. Feeds the local PackView (ADR-0045) under the stable PACK_VIEW_CONSUMER_GROUP. Payload pinned by product-master's apis/asyncapi.yaml on develop.
CloudEvent envelope of product-master's ProductPackLevelDeclared, mirrored read-only from the producer's own contract. This service consumes it (ADR-0045); it never publishes it.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "../dictionary",
"type": "com.warehouse.wms.product-master.product.ProductPackLevelDeclared",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductPackLevelDeclared:v1",
"data": {
"sku": "string",
"level": "string",
"gtin": "string",
"child_gtin": "string",
"qty_of_child": 2,
"units_per_pack": 1,
"is_orderable": true,
"is_despatch_unit": true,
"effective_from": "2019-08-24T14:15:22Z",
"version": 1
}
}
product-master retired a pack level of a SKU.
CONSUMED from warehouse.product-master.events - this entry mirrors the producer's own contract read-only and is NOT published by this service. Feeds the local PackView (ADR-0045) under the stable PACK_VIEW_CONSUMER_GROUP. Payload pinned by product-master's apis/asyncapi.yaml on develop.
CloudEvent envelope of product-master's ProductPackLevelRetired, mirrored read-only from the producer's own contract. This service consumes it (ADR-0045); it never publishes it.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "../dictionary",
"type": "com.warehouse.wms.product-master.product.ProductPackLevelRetired",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductPackLevelRetired:v1",
"data": {
"sku": "string",
"level": "string",
"gtin": "string",
"effective_to": "2019-08-24T14:15:22Z",
"reason": "string",
"version": 1
}
}
product-master measured a pack level of a SKU.
CONSUMED from warehouse.product-master.events - this entry mirrors the producer's own contract read-only and is NOT published by this service. Feeds the local PackView (ADR-0045) under the stable PACK_VIEW_CONSUMER_GROUP. Payload pinned by product-master's apis/asyncapi.yaml on develop.
CloudEvent envelope of product-master's ProductPackLevelMeasured, mirrored read-only from the producer's own contract. This service consumes it (ADR-0045); it never publishes it.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "../dictionary",
"type": "com.warehouse.wms.product-master.product.ProductPackLevelMeasured",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductPackLevelMeasured:v1",
"data": {
"sku": "string",
"level": "string",
"gtin": "string",
"dims": {
"length_mm": 1,
"width_mm": 1,
"height_mm": 1,
"weight_g": 1
},
"measured_at": "2019-08-24T14:15:22Z",
"device_id": "string",
"version": 1
}
}
inventory-storage's integration topic, CONSUMED by this service (owned by that bounded context; listed here read-only for orientation, mirroring its own apis/asyncapi.yaml). Key = the reservation id. This service consumes only StockReserved and ReservationRevoked (the integration payloads; both share one identical data shape) and ignores every other type on the topic.
Keep the SKU-keyed usable-inventory projection current.
The shared inbound consumer applies each event to the SKU-keyed UsableInventoryObserved projection: StockReserved decrements the SKU's usable quantity by quantity, ReservationRevoked increments it back. Messages are CloudEvents 1.0 structured-mode JSON (dataschema urn:warehouse:inventory-storage:events:<EventName>:v1). Every other CloudEvents type on the topic is ignored; a message that is not a valid CloudEvent is logged at WARN and skipped.
Available only on servers:
Accepts one of the following messages:
inventory-storage bound a SKU's quantity to a demand.
CONSUMED from warehouse.inventory.events — this entry mirrors the producer's own contract (StockReservedEvent) read-only and is NOT published by this service. sku, quantity and demand_ref are read; the projection decrements usable inventory for the SKU by quantity.
Mirror of inventory-storage's StockReservedEvent, the integration-payload variant (read-only).
12 units of SKU-1 reserved against an order.
{
"specversion": "1.0",
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"source": "/warehouse/inventory-storage",
"type": "com.warehouse.wms.inventory-storage.reservation.StockReserved",
"subject": "resv-9f8e7d6c-5b4a-4c3d-2e1f-0a9b8c7d6e5f",
"time": "2026-10-17T09:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inventory-storage:events:StockReserved:v1",
"data": {
"sku": "SKU-1",
"quantity": 12,
"demand_ref": "order-88421"
}
}
inventory-storage released a reservation's quantity back to usable.
CONSUMED from warehouse.inventory.events — this entry mirrors the producer's own contract (ReservationRevokedEvent) read-only and is NOT published by this service. sku, quantity and demand_ref are read; the projection increments usable inventory for the SKU back by quantity. The payload shape is identical to StockReserved's, so one handler applies both.
Mirror of inventory-storage's ReservationRevokedEvent, the integration-payload variant (read-only).
The same 12 units return to usable after a cancellation.
{
"specversion": "1.0",
"id": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
"source": "/warehouse/inventory-storage",
"type": "com.warehouse.wms.inventory-storage.reservation.ReservationRevoked",
"subject": "resv-9f8e7d6c-5b4a-4c3d-2e1f-0a9b8c7d6e5f",
"time": "2026-10-17T09:45:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inventory-storage:events:ReservationRevoked:v1",
"data": {
"sku": "SKU-1",
"quantity": 12,
"demand_ref": "order-88421"
}
}
A new work unit was enqueued into a path's work pool.
Raised by the WorkUnit aggregate when EnqueueWorkUnit admits a new releasable unit of work (carrying its CPT) into the process path's work pool. The unit is queued, not yet released. Actively published to warehouse.work-planning.events; the published data carries path_id and work_unit_id.
CloudEvent envelope for a newly enqueued work unit.
network-inventory-planning released a transfer work demand leg.
CONSUMED from warehouse.network-inventory-planning.events — this entry mirrors the producer's own contract read-only and is NOT published by this service. One occurrence = one released transfer demand leg. ApplyWorkDemandReleased validates path_id against the process-path catalogue and work_kind against the declared enum, then enqueues exactly one work unit with the deterministic id demand_id and ref = demand_id (ADR-0033). Redelivery of the same CloudEvents id, or a different event carrying a demand_id already in a pool, is a benign no-op.
CloudEvent envelope of network-inventory-planning's released transfer work demand, mirrored read-only from the producer's own contract. This service consumes it; it never publishes it.
slotting-optimization approved a slot plan for a site.
CONSUMED from warehouse.slotting-optimization.events — this entry mirrors the producer's own contract (SlotPlanApprovedEvent) read-only and is NOT published by this service. Only plan_id, site_id, approved_at, supersedes_plan_id and moves are read; assignments is ignored (ADR-0040).
Mirror of slotting-optimization's SlotPlanApprovedEvent (read-only).
inventory-storage bound a SKU's quantity to a demand.
CONSUMED from warehouse.inventory.events — this entry mirrors the producer's own contract (StockReservedEvent) read-only and is NOT published by this service. sku, quantity and demand_ref are read; the projection decrements usable inventory for the SKU by quantity.
Mirror of inventory-storage's StockReservedEvent, the integration-payload variant (read-only).
inventory-storage released a reservation's quantity back to usable.
CONSUMED from warehouse.inventory.events — this entry mirrors the producer's own contract (ReservationRevokedEvent) read-only and is NOT published by this service. sku, quantity and demand_ref are read; the projection increments usable inventory for the SKU back by quantity. The payload shape is identical to StockReserved's, so one handler applies both.
Mirror of inventory-storage's ReservationRevokedEvent, the integration-payload variant (read-only).
pick-face-replenishment asked for stock to be moved to a forward pick face.
CONSUMED from warehouse.pick-face-replenishment.events — this entry mirrors the producer's own contract (ReplenishmentRequestedEvent) read-only and is NOT published by this service. request_id, site_id, sku, source_bin (the reserve bin, becomes from_bin), forward_bin (the pick face, becomes to_bin), quantity, priority and requested_at are read; policy_min and policy_max are ignored (ADR-0042).
Mirror of pick-face-replenishment's ReplenishmentRequestedEvent (read-only).
pick-face-replenishment cancelled an open replenishment request.
CONSUMED from warehouse.pick-face-replenishment.events — this entry mirrors the producer's own contract (ReplenishmentCancelledEvent) read-only and is NOT published by this service. Only request_id is needed to find the unit; reason is carried for logs (ADR-0042).
Mirror of pick-face-replenishment's ReplenishmentCancelledEvent (read-only).
product-master set or replaced a SKU's handling classification.
CONSUMED from warehouse.product-master.events — this entry mirrors the producer's own contract read-only and is NOT published by this service. A full-state replacement of one SKU's classification at the producer's aggregate version; temperature_class and dot_hazard_class are omitted when unset. Applied to the local product_classification_copy only when version is greater than the stored one (ADR-0035); classification_source is ignored. The WorkReleased encoder maps Hazmat to required_capabilities: ["hazmat"] and Fragile to fragile: true.
CloudEvent envelope of product-master's ProductClassified, mirrored read-only from the producer's own contract. This service consumes it; it never publishes it.
workforce-management committed a shift plan for a path.
CONSUMED from warehouse.workforce.events, read-only mirror of the producer's contract. Not the retired com.warehouse.wes.work-planning.plan.ShiftPlanCommitted this service used to publish (ADR-0049).
Read-only mirror of workforce-management's ShiftPlanCommitted; this service consumes it and never publishes it. Only the fields this service decodes are listed.
fulfillment-execution finished a task.
CONSUMED from warehouse.fulfillment.events, read-only mirror of the producer's contract. Drives RecordCompletion for work_unit_id.
Read-only mirror of fulfillment-execution's TaskCompleted; this service consumes it and never publishes it. Only the fields this service decodes are listed.
order-management allocated an order; its lines are ready to enqueue.
CONSUMED from warehouse.order-management.events, read-only mirror of the producer's contract. One work unit is enqueued per line.
Read-only mirror of order-management's OrderAllocated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
order-management partially allocated an order; the allocated lines are ready to enqueue.
CONSUMED from warehouse.order-management.events, read-only mirror of the producer's contract. Identical payload shape to OrderAllocated; handled identically.
Read-only mirror of order-management's OrderPartiallyAllocated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
process-path-management created a process path.
CONSUMED from warehouse.process-path-management.events only with PATH_CATALOGUE_SOURCE=kafka, read-only mirror of the producer's contract.
Read-only mirror of process-path-management's ProcessPathCreated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
process-path-management updated a process path.
CONSUMED from warehouse.process-path-management.events only with PATH_CATALOGUE_SOURCE=kafka, read-only mirror of the producer's contract.
Read-only mirror of process-path-management's ProcessPathUpdated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
process-path-management deactivated a process path.
CONSUMED from warehouse.process-path-management.events only with PATH_CATALOGUE_SOURCE=kafka, read-only mirror of the producer's contract.
Read-only mirror of process-path-management's ProcessPathDeactivated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
The release policy admitted a work unit into active work.
Raised by the WorkPool aggregate when ReleaseNextWork applies the release policy and admits the highest-priority (earliest-CPT) queued work unit into active work. This is the primary integration event of this bounded context: fulfillment-execution consumes it and turns it into a Task. Actively published to warehouse.work-planning.events. The outbound adapter enriches the data payload with the unit's cpt and ref by reading the WorkUnit repository, since the domain event itself only carries the identifiers. When the released unit carries a known SKU, the adapter also reads that SKU's classification from this context's local copy of product-master's ProductClassified events (ADR-0035; previously a synchronous read from inventory-storage, ADR-0009) and stamps two OPTIONAL derived fields, required_capabilities and fragile, present only when there is a hint to give. It also stamps the OPTIONAL line_no — the order line the unit was made for, stored on the WorkUnit from the OrderAllocated line that created it (ADR-0036) — omitted when unknown. The same line_no rides on the analytics-stream WorkReleased (warehouse.wes.analytics).
CloudEvent envelope for a work unit admitted into active work by the release policy.
A released work unit finished.
Raised by the WorkUnit aggregate when RecordCompletion marks a released unit as done — either from the REST endpoint or from a TaskCompleted event consumed off warehouse.fulfillment.events. The aggregate refuses a double-complete. Actively published to warehouse.work-planning.events; the published data carries path_id and work_unit_id.
CloudEvent envelope for a completed work unit.
A path's backlog depth crossed its alarm threshold.
Raised by the WorkPool aggregate when SampleBacklog observes that the pool's backlog depth has crossed the alarm threshold — the buffer signal that drives flow balancing. Actively published to warehouse.work-planning.events; the published data carries only path_id. Consumers wanting the depth and rate numbers should read the telemetry projection over REST rather than infer them here.
CloudEvent envelope for a backlog alarm threshold breach.
A path's actual throughput deviated materially from plan.
Reserved: declared for a future detection rule (ADR 0020 defers it); not emitted today. Decided 2026-10-06: kept declared, neither emitted nor removed. Re-checked 2026-10-12 (gap fix D26): no ADR defines when it is raised, so it stays reserved; the architecture fitness test TestRateDeviationDetectedStaysReserved fails if production code starts raising it without that ADR.
Raised when a process path's observed throughput diverges materially from the rate committed in its PathPlan — the plan-vs-actual signal for flow balancing. Not yet wired to the outbound Kafka adapter — documented here as part of the domain-event catalog, in-process only today. The event type is declared in internal/domain/shared/events.go and the publisher's payload switch already handles it, but no application use case currently raises it, so nothing is emitted onto the topic. The example below shows the shape it would take once wired.
CloudEvent envelope for a plan-vs-actual rate deviation. Catalog-only today — no use case currently raises this event.
Flow balancing decided to throttle upstream release into a path.
Raised by RebalanceDecision when a flow-fed pool is over its alarm threshold and the recommendation is to throttle upstream release — the rope in Drum-Buffer-Rope pulling back on a saturated buffer. Actively published to warehouse.work-planning.events; the published data carries only path_id.
CloudEvent envelope for an upstream release throttle decision.
Flow balancing recommended moving labor to relieve a path.
Raised by RebalanceDecision when a release-fed pool is at its WIP limit with backlog still queued: releasing more work cannot help, so the recommendation is to move heads onto the path instead. Actively published to warehouse.work-planning.events; the published data carries only path_id. Workforce Management is the intended reader.
CloudEvent envelope for a labor reassignment recommendation.
This service reported a process path's remaining admission capacity for a specific CPT cutoff window.
Raised when SampleBacklog is asked (via the optional cutoffAt query parameter on GET /paths/{pathId}/telemetry, see ADR-0018) to report the path's currently remaining admission capacity, correlated against a CPT cutoff timestamp. This PUBLISHES state this service already tracks on its own WorkPool aggregate (wipLimit minus current WIP) — it introduces no new domain concept or per-CPT capacity bucket. known is false for a FlowFed path (no hard admission ceiling — only an alarm threshold, which is not a capacity figure) or a ReleaseFed path with no WIP limit provisioned; when known is false, remaining_units is always 0.
cutoff_at is this service's own native CPT currency (a concrete RFC3339 timestamp), not process-path-management's site-schedule cptId string, which this service has zero dependency on. A future order-management consumer is responsible for correlating cutoff_at against its own cached CPTWindow.CutoffAt (exact match or nearest- window match) to resolve which cptId this figure applies to — see ADR-0018 for the full correlation-by-timestamp design and its accepted imprecision trade-off. Actively published to warehouse.work-planning.events.
CloudEvent envelope for a reported remaining-admission-capacity figure for a process path, correlated against a CPT cutoff timestamp (see ADR-0018).
Analytics-shaped WorkUnitCreated occurrence on warehouse.wes.analytics.
Analytics-shaped WorkReleased occurrence on warehouse.wes.analytics.
Analytics-shaped WorkUnitCompleted occurrence on warehouse.wes.analytics.
Analytics-shaped BacklogThresholdBreached occurrence on warehouse.wes.analytics.
Analytics-shaped RateDeviationDetected occurrence on warehouse.wes.analytics.
Reserved: declared for a future detection rule (ADR 0020 defers it); not emitted today. No ADR defines when a rate deviation is raised, so no use case raises it (an architecture fitness test, TestRateDeviationDetectedStaysReserved, fails if production code starts to). The projector still counts it, so the report's rateDeviationDetected column is always 0 until a rule is decided.
Analytics-shaped PathThrottled occurrence on warehouse.wes.analytics.
Analytics-shaped LaborReassignmentFlagged occurrence on warehouse.wes.analytics.
Analytics-shaped PathCapacityChanged occurrence on warehouse.wes.analytics.
product-master declared or revised a pack level of a SKU.
CONSUMED from warehouse.product-master.events - this entry mirrors the producer's own contract read-only and is NOT published by this service. Feeds the local PackView (ADR-0045) under the stable PACK_VIEW_CONSUMER_GROUP. Payload pinned by product-master's apis/asyncapi.yaml on develop.
CloudEvent envelope of product-master's ProductPackLevelDeclared, mirrored read-only from the producer's own contract. This service consumes it (ADR-0045); it never publishes it.
product-master retired a pack level of a SKU.
CONSUMED from warehouse.product-master.events - this entry mirrors the producer's own contract read-only and is NOT published by this service. Feeds the local PackView (ADR-0045) under the stable PACK_VIEW_CONSUMER_GROUP. Payload pinned by product-master's apis/asyncapi.yaml on develop.
CloudEvent envelope of product-master's ProductPackLevelRetired, mirrored read-only from the producer's own contract. This service consumes it (ADR-0045); it never publishes it.
product-master measured a pack level of a SKU.
CONSUMED from warehouse.product-master.events - this entry mirrors the producer's own contract read-only and is NOT published by this service. Feeds the local PackView (ADR-0045) under the stable PACK_VIEW_CONSUMER_GROUP. Payload pinned by product-master's apis/asyncapi.yaml on develop.
CloudEvent envelope of product-master's ProductPackLevelMeasured, mirrored read-only from the producer's own contract. This service consumes it (ADR-0045); it never publishes it.
The CloudEvents 1.0 structured-mode context attributes common to every message this service publishes (integration AND analytics topics). Every attribute below is REQUIRED in this fleet (ADR-0027); there is no other envelope.
CloudEvent envelope for a newly enqueued work unit.
CloudEvent envelope of network-inventory-planning's released transfer work demand, mirrored read-only from the producer's own contract. This service consumes it; it never publishes it.
Mirror of slotting-optimization's SlotPlanApprovedEvent (read-only).
Mirror of inventory-storage's StockReservedEvent, the integration-payload variant (read-only).
Mirror of inventory-storage's ReservationRevokedEvent, the integration-payload variant (read-only).
Mirror of pick-face-replenishment's ReplenishmentRequestedEvent (read-only).
Mirror of pick-face-replenishment's ReplenishmentCancelledEvent (read-only).
CloudEvent envelope of product-master's ProductClassified, mirrored read-only from the producer's own contract. This service consumes it; it never publishes it.
Read-only mirror of workforce-management's ShiftPlanCommitted; this service consumes it and never publishes it. Only the fields this service decodes are listed.
Read-only mirror of fulfillment-execution's TaskCompleted; this service consumes it and never publishes it. Only the fields this service decodes are listed.
Read-only mirror of order-management's OrderAllocated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
Read-only mirror of order-management's OrderPartiallyAllocated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
Read-only mirror of process-path-management's ProcessPathCreated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
Read-only mirror of process-path-management's ProcessPathUpdated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
Read-only mirror of process-path-management's ProcessPathDeactivated; this service consumes it and never publishes it. Only the fields this service decodes are listed.
CloudEvent envelope for a work unit admitted into active work by the release policy.
CloudEvent envelope for a completed work unit.
CloudEvent envelope for a backlog alarm threshold breach.
CloudEvent envelope for a plan-vs-actual rate deviation. Catalog-only today — no use case currently raises this event.
CloudEvent envelope for an upstream release throttle decision.
CloudEvent envelope for a labor reassignment recommendation.
CloudEvent envelope for a reported remaining-admission-capacity figure for a process path, correlated against a CPT cutoff timestamp (see ADR-0018).
CloudEvent envelope of product-master's ProductPackLevelDeclared, mirrored read-only from the producer's own contract. This service consumes it (ADR-0045); it never publishes it.
CloudEvent envelope of product-master's ProductPackLevelRetired, mirrored read-only from the producer's own contract. This service consumes it (ADR-0045); it never publishes it.
CloudEvent envelope of product-master's ProductPackLevelMeasured, mirrored read-only from the producer's own contract. This service consumes it (ADR-0045); it never publishes it.