Domain-event catalog for the facility-layout bounded context, the system of record for where things physically are in the building: the site's structural hierarchy (Site, Area, Zone, Aisle) and the coded storage slots inside it. This context is a Generic Subdomain and an Open Host Service — these events ARE its Published Language, and every downstream service is a Conformist to them. Unlike a service that forwards a curated subset, this context's Kafka publisher (internal/adapters/outbound/kafka/publisher.go) emits every domain event to the integration topic — the whole Published Language.
Envelope: CloudEvents 1.0 (mandatory, ADR-0024). Every message on this channel is a CloudEvents 1.0 event in structured content mode (CloudEvents Kafka protocol binding): the Kafka message value is the JSON event format and every message carries the Kafka header content-type: application/cloudevents+json; charset=UTF-8. All of specversion (1.0), id (UUID, minted once per domain event and stable across outbox redelivery), source (/warehouse/facility-layout), type, subject (the aggregate instance id), time (the domain occurred-at, UTC), datacontenttype (application/json) and dataschema (urn:warehouse:facility-layout:events:<EventName>:v1) are required. data carries the domain event's own JSON verbatim — note it also carries eventName, eventType and occurredAt fields, because the domain event's struct tags are the wire shape. There is no other envelope: consumers must reject (DLQ/skip) anything that fails CloudEvents validation.
The type attribute follows the platform-wide reverse-DNS convention com.warehouse.<subdomain>.<bounded-context>.<entity>.<EventName> — all lowercase except the final PascalCase event name, and the entity segment carries no hyphen even for multi-word aggregate names. This service's subdomain segment is wms: bin-accurate location is WMS-tier in the domain reference. Consumers dispatch on the FULL type string. Example: com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered. A breaking payload change is published as a new .v2 type with a :v2 dataschema, never by mutating an existing one.
Partitioning and ordering. The Kafka message key is the identity of the aggregate that raised the event (site code, zone id, aisle id, location code, rule id, location type name, structure id, or a cross-aisle's composite identity), so all events for one aggregate land on the same partition and per-aggregate order is preserved (ADR-0032 extended this to the ADR-0017 geometry / structure / cross-aisle events, which were previously keyed by their event type and so shared one partition per type). The single exception is FacilityLayoutImported, a batch outcome with no aggregate: it is keyed by its CloudEvents id and carries no ordering guarantee. The CloudEvents subject is the aggregate instance (layout-import for FacilityLayoutImported).
Live consumer. inventory-storage maintains a local read model of location classifications fed by this topic (internal/adapters/outbound/facilitycache/, selected with LOCATION_LOOKUP_MODE=kafka), replacing its per-stow synchronous GET /locations/{locationCode}/classification call. It consumes ZoneRegistered, LocationSlotRegistered and LocationSlotDecommissioned, replaying the topic from the first offset on every process start under a per-instance-unique consumer group, and gates its readiness on that replay completing. warehouse-planning also consumes this topic (own fixed consumer group, at-least-once): LocationSlotRegistered and LocationSlotDecommissioned feed its storage-position / work-center-station tally. Every other event is published but has no wired consumer today — they are Published Language available for future Conformists, stated so a downstream team cannot mistake an available event for a consumed one. See facility-layout ADR-0009 (integration publishing) and inventory-storage ADR-0013 (the location-classification cache).
The shared warehouse-systems Kafka broker (the in-cluster release, reachable from the host at localhost:9092), addressed via the KAFKA_BROKERS environment variable. The Kafka publisher is selected with EVENT_PUBLISHER=kafka; the default (unset) keeps the Postgres outbox / log publisher, so tests and local runs never need a broker.
The single outbound integration topic for this bounded context, named after the Topic constant in internal/adapters/outbound/kafka/publisher.go (warehouse.facility.events). Every domain event this context raises is published here when EVENT_PUBLISHER=kafka — the whole Published Language, not a subset. The one live consumer today is inventory-storage's location-classification cache (ZoneRegistered, LocationSlotRegistered, LocationSlotDecommissioned); everything else is available, unconsumed Published Language.
Consume facility-layout's Published Language.
Subscribe to every structural fact about the warehouse map. At-least- once delivery is the consumer's problem: deduplicate on the CloudEvents id, and expect to see the full history on a from-first-offset replay. A consumer building a local read model should follow the inventory-storage precedent: per-process-unique consumer group, FirstOffset replay, readiness gated on catching up to the high watermark observed at start.
Available only on servers:
Accepts one of the following messages:
A physical facility/building was added to the warehouse map.
Raised by RegisterSite. Kafka key: siteCode. No consumer wired today. siteRole is additive (ADR-0037): the site's role in the fulfilment network, UNSPECIFIED when the registration stated none (a consumer decoding the older payload simply ignores it). gln is additive and optional (ADR-0045): the site's GS1 Global Location Number, omitted when none was recorded.
A site registered with its GS1 Global Location Number
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.site.SiteRegistered",
"subject": "WH1",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:SiteRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "SiteRegistered",
"eventType": "com.warehouse.wms.facility-layout.site.SiteRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"siteCode": "WH1",
"siteName": "Main",
"siteRole": "NON_SORTABLE_FC",
"gln": "4006381333931"
}
}
A site registered without the optional gln (the shape before ADR-0045)
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.site.SiteRegistered",
"subject": "WH1",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:SiteRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "SiteRegistered",
"eventType": "com.warehouse.wms.facility-layout.site.SiteRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"siteCode": "WH1",
"siteName": "Main",
"siteRole": "NON_SORTABLE_FC"
}
}
A site's transfer capability state changed.
A complete, PII-free last-write-wins snapshot of site transfer capability. Kafka key and CloudEvents subject: site_code. Consumers compare capability_revision and retain the latest complete snapshot; they must not infer either capability from facility topology. Raised by PUT /sites/{siteCode}/transfer-capability through the transactional outbox, once per real change (ADR-0035), AND re-emitted periodically as a freshness HEARTBEAT (ADR-0041). A heartbeat is this same event type: the CURRENT values, a new CloudEvents id, the same key and subject, a fresh time, and capability_revision advanced by one. It is raised every SITE_CAPABILITY_HEARTBEAT_INTERVAL (chart config.siteCapabilityHeartbeatInterval, default 5m; 0 disables it) for every ACTIVE site that has declared a capability, so a consumer with a freshness window (network-inventory-planning treats a fact older than 10 minutes as stale) keeps a fact it has no reason to change. The CloudEvents time is the as_of watermark: it is the moment of emission, for a change and for a heartbeat alike. capability_revision starts at 1 and increases by exactly one per event of the same site, change or heartbeat, so consumers must not read a revision step as a capability change: compare the values. A PUT of the value a site already holds is still a no-op and raises nothing (ADR-0035). The payload stays snake_case although every other facility-layout payload is camelCase: recasing it would be a breaking .v2 for network-inventory-planning (ADR-0035, decision D2).
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.site.SiteCapabilityChanged",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:SiteCapabilityChanged:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"site_code": "string",
"transfer_origin_enabled": true,
"transfer_destination_enabled": true,
"capability_revision": 0
}
}
An operator changed a site's role in the fulfilment network.
Raised by PUT /sites/{siteCode}/role through the transactional outbox, once per real change (repeating the current role publishes nothing) (ADR-0037). Kafka key and CloudEvents subject: siteCode, so the changes of one site stay ordered. Carries the new and the replaced role. It never implies a transfer-capability change: that is only ever SiteCapabilityChanged (ADR-0035). The one-time backfill of migration 0009 publishes no SiteRoleChanged; read the role of existing sites on GET /sites.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.site.SiteRoleChanged",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:SiteRoleChanged:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"siteCode": "string",
"siteRole": "UNSPECIFIED",
"previousSiteRole": "UNSPECIFIED"
}
}
A behavioral zone was added inside a Site's area.
Raised by RegisterZone. Kafka key: zoneId. Consumed live by inventory-storage's location-classification cache — the zone's hazmat and temperatureClass attributes are exactly what its StowStock placement check reads. gln is additive and optional (ADR-0045): the zone's GS1 Global Location Number, omitted when none was recorded.
A zone registered with its GS1 Global Location Number
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.zone.ZoneRegistered",
"subject": "WH1-YARD-NORTH",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:ZoneRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "ZoneRegistered",
"eventType": "com.warehouse.wms.facility-layout.zone.ZoneRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"zoneId": "WH1-YARD-NORTH",
"siteCode": "WH1",
"areaCode": "YARD",
"zoneCode": "NORTH",
"temperatureClass": "Ambient",
"hazmat": false,
"gln": "5412345000013"
}
}
A zone registered without the optional gln (the shape before ADR-0045)
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.zone.ZoneRegistered",
"subject": "WH1-STOR-AMB",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:ZoneRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "ZoneRegistered",
"eventType": "com.warehouse.wms.facility-layout.zone.ZoneRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"zoneId": "WH1-STOR-AMB",
"siteCode": "WH1",
"areaCode": "STOR",
"zoneCode": "AMB",
"temperatureClass": "Ambient",
"hazmat": false
}
}
A zone's traffic mode (PEDESTRIAN, ROBOT_ONLY or SHARED) was declared or changed.
Raised by DeclareZoneTrafficMode (ADR-0049), i.e. PUT /zones/{zoneId}/traffic-mode, whenever the declared mode differs from the zone's current one; declaring the current mode publishes nothing. The zone is identified by zoneId, exactly as in ZoneRegistered, which never carries the mode (a zone is always registered PEDESTRIAN and its mode is declared after). CloudEvents subject and Kafka key: zoneId (same partition as that zone's ZoneRegistered). A consumer keeping a per-zone copy applies last-write-wins per zoneId: PEDESTRIAN from ZoneRegistered implicitly, and every ZoneTrafficModeDeclared thereafter. This is a structural fact about the building, not a safety function and not a reservation: the fleet controller decides who goes where.
A pick aisle's mode changes from PEDESTRIAN to ROBOT_ONLY
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.zone.ZoneTrafficModeDeclared",
"subject": "WH1-STOR-AMB",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:ZoneTrafficModeDeclared:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "ZoneTrafficModeDeclared",
"eventType": "com.warehouse.wms.facility-layout.zone.ZoneTrafficModeDeclared",
"occurredAt": "2026-02-03T04:05:06Z",
"zoneId": "WH1-STOR-AMB",
"siteCode": "WH1",
"trafficMode": "ROBOT_ONLY",
"previousTrafficMode": "PEDESTRIAN",
"declaredAt": "2026-02-03T04:05:06Z"
}
}
A physical corridor was added inside a Zone.
Raised by RegisterAisle. Kafka key: aisleId. No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.aisle.AisleRegistered",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:AisleRegistered:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"aisleId": "string",
"zoneId": "string",
"aisleCode": "string",
"sequenceHint": 0,
"direction": "OneWay"
}
}
A reusable slot shape/kind was defined.
Raised by RegisterLocationType. Kafka key: locationType. No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationtype.LocationTypeRegistered",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationTypeRegistered:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"locationType": "string",
"role": "string",
"maxWeightKg": 0,
"maxVolumeM3": 0
}
}
A rule constraining which LocationTypes are legal in which Zones was declared.
Raised by DefinePlacementRule. Kafka key: ruleId. No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.placementrule.PlacementRuleDefined",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:PlacementRuleDefined:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"ruleId": "string",
"locationType": "string",
"effect": "string",
"predicate": "string"
}
}
A coded leaf slot now exists on the warehouse map.
Raised by RegisterLocationSlot, and once per successful row of ImportFacilityLayout. Kafka key: locationCode. Consumed live by inventory-storage's location-classification cache, which joins the slot to its parent zone's attributes via zoneId. gln and spotKind are additive and optional (ADR-0045): the slot's GS1 Global Location Number and, on a Yard slot only, what the spot is for; both are omitted when none was recorded, so the payload of every existing slot is byte-identical to before. They are set at registration only; there is no update event for them yet.
A refrigerated-trailer yard spot with a GLN and a spotKind
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"subject": "WH1-YARD-NORTH-Y01-01-01-A",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationSlotRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "LocationSlotRegistered",
"eventType": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"locationCode": "WH1-YARD-NORTH-Y01-01-01-A",
"aisleId": "WH1-YARD-NORTH-Y01",
"zoneId": "WH1-YARD-NORTH",
"locationType": "YardSpot",
"role": "Yard",
"gln": "4012345000009",
"spotKind": "REEFER_PLUG"
}
}
A dock door with a GLN and no spotKind
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"subject": "WH1-STOR-AMB-A07-03-02-B",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationSlotRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "LocationSlotRegistered",
"eventType": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"locationCode": "WH1-STOR-AMB-A07-03-02-B",
"aisleId": "WH1-STOR-AMB-A07",
"zoneId": "WH1-STOR-AMB",
"locationType": "Dock",
"role": "Dock",
"dockFlow": "Inbound",
"gln": "9780201379624"
}
}
A storage bin without gln or spotKind (the shape before ADR-0045)
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"subject": "WH1-STOR-AMB-A07-03-02-B",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationSlotRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "LocationSlotRegistered",
"eventType": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"locationCode": "WH1-STOR-AMB-A07-03-02-B",
"aisleId": "WH1-STOR-AMB-A07",
"zoneId": "WH1-STOR-AMB",
"locationType": "PalletRack",
"role": "Storage",
"maxWeightKg": 500,
"maxVolumeM3": 1
}
}
A coded slot was permanently retired.
Raised by DecommissionLocationSlot. Kafka key: locationCode. Consumed live by inventory-storage's location-classification cache, which evicts the slot (its stow placement check then fails open for that location, by design). Decommissioning is irreversible — there is no compensating event.
A storage bin permanently retired from the warehouse map
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissioned",
"subject": "WH1-STOR-AMB-A07-03-02-B",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationSlotDecommissioned:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "LocationSlotDecommissioned",
"eventType": "com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissioned",
"occurredAt": "2026-02-03T04:05:06Z",
"locationCode": "WH1-STOR-AMB-A07-03-02-B"
}
}
A bulk layout import completed.
Raised once per ImportFacilityLayout call, summarising rows submitted/imported/rejected — in addition to, not instead of, the per-slot LocationSlotRegistered events for each successful row. Kafka key: the event's CloudEvents id (no single aggregate identity — a batch outcome — so batches spread across partitions; ordering against other events is not guaranteed); CloudEvents subject: the fixed batch identity layout-import. No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.FacilityLayoutImported",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:FacilityLayoutImported:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"rowsSubmitted": 0,
"slotsImported": 0,
"rowsRejected": 0
}
}
A slot's handling unit (EACH, CASE or PALLET) was set or changed.
Raised by DeclareLocationHandlingUnit (ADR-0040), i.e. PUT /locations/{locationCode}/handling-unit. The slot is identified by locationCode, exactly as in LocationSlotRegistered. CloudEvents subject and Kafka key: locationCode (same partition as that location's LocationSlotRegistered). Consumed live by inventory-storage's facility cache, which uses the handling unit to decide whether a sealed case may be stowed in the bin. Last write wins per locationCode (same partition, so ordered).
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotHandlingUnitDeclared",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationSlotHandlingUnitDeclared:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"locationCode": "WH1-STOR-AMB-A07-03-02-B",
"handlingUnit": "CASE",
"declaredAt": "2026-10-24T12:00:00Z"
}
}
A coded slot's physical position/footprint was set or changed.
Raised by SetLocationGeometry (ADR-0017). CloudEvents subject: locationCode. Kafka key: locationCode (same partition as that location's LocationSlotRegistered). No consumer wired today.
A storage bin positioned in the site frame with a pick-path override
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationGeometryUpdated",
"subject": "WH1-STOR-AMB-A07-03-02-B",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationGeometryUpdated:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "LocationGeometryUpdated",
"eventType": "com.warehouse.wms.facility-layout.locationslot.LocationGeometryUpdated",
"occurredAt": "2026-02-03T04:05:06Z",
"locationCode": "WH1-STOR-AMB-A07-03-02-B",
"xM": 12.5,
"yM": 40.25,
"zM": 1.5,
"widthM": 1.2,
"depthM": 1,
"heightM": 1.8,
"pickSequence": 4217
}
}
An aisle's travel centreline was set or changed.
Raised by SetAisleGeometry (ADR-0017): the straight-line path the travel graph uses as this aisle's walkable route. CloudEvents subject: aisleId. Kafka key: aisleId (same partition as that aisle's AisleRegistered). No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.aisle.AisleGeometryUpdated",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:AisleGeometryUpdated:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"aisleId": "WH1-STOR-AMB-A07",
"startXM": 0,
"startYM": 0,
"startZM": 0,
"endXM": 0,
"endYM": 0,
"endZM": 0,
"lengthM": 0
}
}
A site-scoped physical obstacle was added to the warehouse map.
Raised by RegisterFixedStructure (ADR-0017): a wall, column, office, conveyor, or other fixed object. Not a location — nothing can be stowed at it. CloudEvents subject: structureId. Kafka key: structureId. No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.structure.FixedStructureRegistered",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:FixedStructureRegistered:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"structureId": "STR-1",
"siteCode": "WH1",
"kind": "string",
"xM": 0,
"yM": 0,
"zM": 0,
"widthM": 0,
"depthM": 0,
"heightM": 0,
"label": "North wall"
}
}
A connection between two aisles was added to the travel graph.
Raised by RegisterCrossAisle (ADR-0017): a zone-scoped connection between two of its aisles at a bay ordinal, letting the travel graph route between aisles without walking to either end. CloudEvents subject: <zoneId>/<fromAisle>-<toAisle>@<atBay> (the cross-aisle's composite identity), which is also its Kafka key. No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.crossaisle.CrossAisleRegistered",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:CrossAisleRegistered:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"zoneId": "WH1-STOR-AMB",
"fromAisle": "A07",
"toAisle": "A08",
"atBay": "02"
}
}
The analytics topic of this bounded context (ADR-0010), named after the AnalyticsTopic constant in internal/adapters/outbound/kafka/analytics_publisher.go (warehouse.facility.analytics). The composition root fans EVERY domain event out to it alongside the integration topic when EVENT_PUBLISHER=kafka and analytics.enabled — same CloudEvent type and id per occurrence, with dataschema=urn:warehouse:facility-layout:analytics:<EventName>:v1. It is NOT part of the cross-context integration contract: it exists so this service's own analytical read model (the "Layout Catalog Growth & Change" data product) can evolve independently of the OLTP Published Language. Cross-context consumers should subscribe to warehouse.facility.events, not here.
Consume facility-layout's analytics stream (internal data product).
The only supported consumer is this service's own cmd/facility-projector (single writer of the analytical database, ADR-0010). It follows the same at-least-once discipline: per-process-unique consumer group, FirstOffset replay, idempotent projection keyed on the CloudEvent id, readiness gated on catching up to the high watermark observed at start. The topic carries every event type; the projector derives its report from SiteRegistered, ZoneRegistered, AisleRegistered, LocationTypeRegistered, PlacementRuleDefined, LocationSlotRegistered, LocationSlotDecommissioned and FacilityLayoutImported, and ignores the other types. A message that fails CloudEvents validation goes to the .dlq topic (warehouse.facility.analytics.dlq).
Available only on servers:
Accepts one of the following messages:
A physical facility/building was added to the warehouse map.
Raised by RegisterSite. Kafka key: siteCode. No consumer wired today. siteRole is additive (ADR-0037): the site's role in the fulfilment network, UNSPECIFIED when the registration stated none (a consumer decoding the older payload simply ignores it). gln is additive and optional (ADR-0045): the site's GS1 Global Location Number, omitted when none was recorded.
A site registered with its GS1 Global Location Number
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.site.SiteRegistered",
"subject": "WH1",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:SiteRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "SiteRegistered",
"eventType": "com.warehouse.wms.facility-layout.site.SiteRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"siteCode": "WH1",
"siteName": "Main",
"siteRole": "NON_SORTABLE_FC",
"gln": "4006381333931"
}
}
A site registered without the optional gln (the shape before ADR-0045)
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.site.SiteRegistered",
"subject": "WH1",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:SiteRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "SiteRegistered",
"eventType": "com.warehouse.wms.facility-layout.site.SiteRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"siteCode": "WH1",
"siteName": "Main",
"siteRole": "NON_SORTABLE_FC"
}
}
A site's transfer capability state changed.
A complete, PII-free last-write-wins snapshot of site transfer capability. Kafka key and CloudEvents subject: site_code. Consumers compare capability_revision and retain the latest complete snapshot; they must not infer either capability from facility topology. Raised by PUT /sites/{siteCode}/transfer-capability through the transactional outbox, once per real change (ADR-0035), AND re-emitted periodically as a freshness HEARTBEAT (ADR-0041). A heartbeat is this same event type: the CURRENT values, a new CloudEvents id, the same key and subject, a fresh time, and capability_revision advanced by one. It is raised every SITE_CAPABILITY_HEARTBEAT_INTERVAL (chart config.siteCapabilityHeartbeatInterval, default 5m; 0 disables it) for every ACTIVE site that has declared a capability, so a consumer with a freshness window (network-inventory-planning treats a fact older than 10 minutes as stale) keeps a fact it has no reason to change. The CloudEvents time is the as_of watermark: it is the moment of emission, for a change and for a heartbeat alike. capability_revision starts at 1 and increases by exactly one per event of the same site, change or heartbeat, so consumers must not read a revision step as a capability change: compare the values. A PUT of the value a site already holds is still a no-op and raises nothing (ADR-0035). The payload stays snake_case although every other facility-layout payload is camelCase: recasing it would be a breaking .v2 for network-inventory-planning (ADR-0035, decision D2).
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.site.SiteCapabilityChanged",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:SiteCapabilityChanged:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"site_code": "string",
"transfer_origin_enabled": true,
"transfer_destination_enabled": true,
"capability_revision": 0
}
}
An operator changed a site's role in the fulfilment network.
Raised by PUT /sites/{siteCode}/role through the transactional outbox, once per real change (repeating the current role publishes nothing) (ADR-0037). Kafka key and CloudEvents subject: siteCode, so the changes of one site stay ordered. Carries the new and the replaced role. It never implies a transfer-capability change: that is only ever SiteCapabilityChanged (ADR-0035). The one-time backfill of migration 0009 publishes no SiteRoleChanged; read the role of existing sites on GET /sites.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.site.SiteRoleChanged",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:SiteRoleChanged:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"siteCode": "string",
"siteRole": "UNSPECIFIED",
"previousSiteRole": "UNSPECIFIED"
}
}
A behavioral zone was added inside a Site's area.
Raised by RegisterZone. Kafka key: zoneId. Consumed live by inventory-storage's location-classification cache — the zone's hazmat and temperatureClass attributes are exactly what its StowStock placement check reads. gln is additive and optional (ADR-0045): the zone's GS1 Global Location Number, omitted when none was recorded.
A zone registered with its GS1 Global Location Number
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.zone.ZoneRegistered",
"subject": "WH1-YARD-NORTH",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:ZoneRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "ZoneRegistered",
"eventType": "com.warehouse.wms.facility-layout.zone.ZoneRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"zoneId": "WH1-YARD-NORTH",
"siteCode": "WH1",
"areaCode": "YARD",
"zoneCode": "NORTH",
"temperatureClass": "Ambient",
"hazmat": false,
"gln": "5412345000013"
}
}
A zone registered without the optional gln (the shape before ADR-0045)
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.zone.ZoneRegistered",
"subject": "WH1-STOR-AMB",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:ZoneRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "ZoneRegistered",
"eventType": "com.warehouse.wms.facility-layout.zone.ZoneRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"zoneId": "WH1-STOR-AMB",
"siteCode": "WH1",
"areaCode": "STOR",
"zoneCode": "AMB",
"temperatureClass": "Ambient",
"hazmat": false
}
}
A zone's traffic mode (PEDESTRIAN, ROBOT_ONLY or SHARED) was declared or changed.
Raised by DeclareZoneTrafficMode (ADR-0049), i.e. PUT /zones/{zoneId}/traffic-mode, whenever the declared mode differs from the zone's current one; declaring the current mode publishes nothing. The zone is identified by zoneId, exactly as in ZoneRegistered, which never carries the mode (a zone is always registered PEDESTRIAN and its mode is declared after). CloudEvents subject and Kafka key: zoneId (same partition as that zone's ZoneRegistered). A consumer keeping a per-zone copy applies last-write-wins per zoneId: PEDESTRIAN from ZoneRegistered implicitly, and every ZoneTrafficModeDeclared thereafter. This is a structural fact about the building, not a safety function and not a reservation: the fleet controller decides who goes where.
A pick aisle's mode changes from PEDESTRIAN to ROBOT_ONLY
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.zone.ZoneTrafficModeDeclared",
"subject": "WH1-STOR-AMB",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:ZoneTrafficModeDeclared:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "ZoneTrafficModeDeclared",
"eventType": "com.warehouse.wms.facility-layout.zone.ZoneTrafficModeDeclared",
"occurredAt": "2026-02-03T04:05:06Z",
"zoneId": "WH1-STOR-AMB",
"siteCode": "WH1",
"trafficMode": "ROBOT_ONLY",
"previousTrafficMode": "PEDESTRIAN",
"declaredAt": "2026-02-03T04:05:06Z"
}
}
A physical corridor was added inside a Zone.
Raised by RegisterAisle. Kafka key: aisleId. No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.aisle.AisleRegistered",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:AisleRegistered:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"aisleId": "string",
"zoneId": "string",
"aisleCode": "string",
"sequenceHint": 0,
"direction": "OneWay"
}
}
A reusable slot shape/kind was defined.
Raised by RegisterLocationType. Kafka key: locationType. No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationtype.LocationTypeRegistered",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationTypeRegistered:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"locationType": "string",
"role": "string",
"maxWeightKg": 0,
"maxVolumeM3": 0
}
}
A rule constraining which LocationTypes are legal in which Zones was declared.
Raised by DefinePlacementRule. Kafka key: ruleId. No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.placementrule.PlacementRuleDefined",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:PlacementRuleDefined:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"ruleId": "string",
"locationType": "string",
"effect": "string",
"predicate": "string"
}
}
A coded leaf slot now exists on the warehouse map.
Raised by RegisterLocationSlot, and once per successful row of ImportFacilityLayout. Kafka key: locationCode. Consumed live by inventory-storage's location-classification cache, which joins the slot to its parent zone's attributes via zoneId. gln and spotKind are additive and optional (ADR-0045): the slot's GS1 Global Location Number and, on a Yard slot only, what the spot is for; both are omitted when none was recorded, so the payload of every existing slot is byte-identical to before. They are set at registration only; there is no update event for them yet.
A refrigerated-trailer yard spot with a GLN and a spotKind
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"subject": "WH1-YARD-NORTH-Y01-01-01-A",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationSlotRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "LocationSlotRegistered",
"eventType": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"locationCode": "WH1-YARD-NORTH-Y01-01-01-A",
"aisleId": "WH1-YARD-NORTH-Y01",
"zoneId": "WH1-YARD-NORTH",
"locationType": "YardSpot",
"role": "Yard",
"gln": "4012345000009",
"spotKind": "REEFER_PLUG"
}
}
A dock door with a GLN and no spotKind
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"subject": "WH1-STOR-AMB-A07-03-02-B",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationSlotRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "LocationSlotRegistered",
"eventType": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"locationCode": "WH1-STOR-AMB-A07-03-02-B",
"aisleId": "WH1-STOR-AMB-A07",
"zoneId": "WH1-STOR-AMB",
"locationType": "Dock",
"role": "Dock",
"dockFlow": "Inbound",
"gln": "9780201379624"
}
}
A storage bin without gln or spotKind (the shape before ADR-0045)
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"subject": "WH1-STOR-AMB-A07-03-02-B",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationSlotRegistered:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "LocationSlotRegistered",
"eventType": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"occurredAt": "2026-02-03T04:05:06Z",
"locationCode": "WH1-STOR-AMB-A07-03-02-B",
"aisleId": "WH1-STOR-AMB-A07",
"zoneId": "WH1-STOR-AMB",
"locationType": "PalletRack",
"role": "Storage",
"maxWeightKg": 500,
"maxVolumeM3": 1
}
}
A coded slot was permanently retired.
Raised by DecommissionLocationSlot. Kafka key: locationCode. Consumed live by inventory-storage's location-classification cache, which evicts the slot (its stow placement check then fails open for that location, by design). Decommissioning is irreversible — there is no compensating event.
A storage bin permanently retired from the warehouse map
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissioned",
"subject": "WH1-STOR-AMB-A07-03-02-B",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationSlotDecommissioned:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "LocationSlotDecommissioned",
"eventType": "com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissioned",
"occurredAt": "2026-02-03T04:05:06Z",
"locationCode": "WH1-STOR-AMB-A07-03-02-B"
}
}
A bulk layout import completed.
Raised once per ImportFacilityLayout call, summarising rows submitted/imported/rejected — in addition to, not instead of, the per-slot LocationSlotRegistered events for each successful row. Kafka key: the event's CloudEvents id (no single aggregate identity — a batch outcome — so batches spread across partitions; ordering against other events is not guaranteed); CloudEvents subject: the fixed batch identity layout-import. No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.FacilityLayoutImported",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:FacilityLayoutImported:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"rowsSubmitted": 0,
"slotsImported": 0,
"rowsRejected": 0
}
}
A slot's handling unit (EACH, CASE or PALLET) was set or changed.
Raised by DeclareLocationHandlingUnit (ADR-0040), i.e. PUT /locations/{locationCode}/handling-unit. The slot is identified by locationCode, exactly as in LocationSlotRegistered. CloudEvents subject and Kafka key: locationCode (same partition as that location's LocationSlotRegistered). Consumed live by inventory-storage's facility cache, which uses the handling unit to decide whether a sealed case may be stowed in the bin. Last write wins per locationCode (same partition, so ordered).
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotHandlingUnitDeclared",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationSlotHandlingUnitDeclared:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"locationCode": "WH1-STOR-AMB-A07-03-02-B",
"handlingUnit": "CASE",
"declaredAt": "2026-10-24T12:00:00Z"
}
}
A coded slot's physical position/footprint was set or changed.
Raised by SetLocationGeometry (ADR-0017). CloudEvents subject: locationCode. Kafka key: locationCode (same partition as that location's LocationSlotRegistered). No consumer wired today.
A storage bin positioned in the site frame with a pick-path override
{
"specversion": "1.0",
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationGeometryUpdated",
"subject": "WH1-STOR-AMB-A07-03-02-B",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationGeometryUpdated:v1",
"time": "2026-02-03T04:05:06Z",
"data": {
"eventName": "LocationGeometryUpdated",
"eventType": "com.warehouse.wms.facility-layout.locationslot.LocationGeometryUpdated",
"occurredAt": "2026-02-03T04:05:06Z",
"locationCode": "WH1-STOR-AMB-A07-03-02-B",
"xM": 12.5,
"yM": 40.25,
"zM": 1.5,
"widthM": 1.2,
"depthM": 1,
"heightM": 1.8,
"pickSequence": 4217
}
}
An aisle's travel centreline was set or changed.
Raised by SetAisleGeometry (ADR-0017): the straight-line path the travel graph uses as this aisle's walkable route. CloudEvents subject: aisleId. Kafka key: aisleId (same partition as that aisle's AisleRegistered). No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.aisle.AisleGeometryUpdated",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:AisleGeometryUpdated:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"aisleId": "WH1-STOR-AMB-A07",
"startXM": 0,
"startYM": 0,
"startZM": 0,
"endXM": 0,
"endYM": 0,
"endZM": 0,
"lengthM": 0
}
}
A site-scoped physical obstacle was added to the warehouse map.
Raised by RegisterFixedStructure (ADR-0017): a wall, column, office, conveyor, or other fixed object. Not a location — nothing can be stowed at it. CloudEvents subject: structureId. Kafka key: structureId. No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.structure.FixedStructureRegistered",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:FixedStructureRegistered:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"structureId": "STR-1",
"siteCode": "WH1",
"kind": "string",
"xM": 0,
"yM": 0,
"zM": 0,
"widthM": 0,
"depthM": 0,
"heightM": 0,
"label": "North wall"
}
}
A connection between two aisles was added to the travel graph.
Raised by RegisterCrossAisle (ADR-0017): a zone-scoped connection between two of its aisles at a bay ordinal, letting the travel graph route between aisles without walking to either end. CloudEvents subject: <zoneId>/<fromAisle>-<toAisle>@<atBay> (the cross-aisle's composite identity), which is also its Kafka key. No consumer wired today.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.crossaisle.CrossAisleRegistered",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:CrossAisleRegistered:v1",
"data": {
"eventName": "string",
"eventType": "string",
"occurredAt": "2019-08-24T14:15:22Z",
"zoneId": "WH1-STOR-AMB",
"fromAisle": "A07",
"toAisle": "A08",
"atBay": "02"
}
}
A physical facility/building was added to the warehouse map.
Raised by RegisterSite. Kafka key: siteCode. No consumer wired today. siteRole is additive (ADR-0037): the site's role in the fulfilment network, UNSPECIFIED when the registration stated none (a consumer decoding the older payload simply ignores it). gln is additive and optional (ADR-0045): the site's GS1 Global Location Number, omitted when none was recorded.
An operator changed a site's role in the fulfilment network.
Raised by PUT /sites/{siteCode}/role through the transactional outbox, once per real change (repeating the current role publishes nothing) (ADR-0037). Kafka key and CloudEvents subject: siteCode, so the changes of one site stay ordered. Carries the new and the replaced role. It never implies a transfer-capability change: that is only ever SiteCapabilityChanged (ADR-0035). The one-time backfill of migration 0009 publishes no SiteRoleChanged; read the role of existing sites on GET /sites.
A site's transfer capability state changed.
A complete, PII-free last-write-wins snapshot of site transfer capability. Kafka key and CloudEvents subject: site_code. Consumers compare capability_revision and retain the latest complete snapshot; they must not infer either capability from facility topology. Raised by PUT /sites/{siteCode}/transfer-capability through the transactional outbox, once per real change (ADR-0035), AND re-emitted periodically as a freshness HEARTBEAT (ADR-0041). A heartbeat is this same event type: the CURRENT values, a new CloudEvents id, the same key and subject, a fresh time, and capability_revision advanced by one. It is raised every SITE_CAPABILITY_HEARTBEAT_INTERVAL (chart config.siteCapabilityHeartbeatInterval, default 5m; 0 disables it) for every ACTIVE site that has declared a capability, so a consumer with a freshness window (network-inventory-planning treats a fact older than 10 minutes as stale) keeps a fact it has no reason to change. The CloudEvents time is the as_of watermark: it is the moment of emission, for a change and for a heartbeat alike. capability_revision starts at 1 and increases by exactly one per event of the same site, change or heartbeat, so consumers must not read a revision step as a capability change: compare the values. A PUT of the value a site already holds is still a no-op and raises nothing (ADR-0035). The payload stays snake_case although every other facility-layout payload is camelCase: recasing it would be a breaking .v2 for network-inventory-planning (ADR-0035, decision D2).
A behavioral zone was added inside a Site's area.
Raised by RegisterZone. Kafka key: zoneId. Consumed live by inventory-storage's location-classification cache — the zone's hazmat and temperatureClass attributes are exactly what its StowStock placement check reads. gln is additive and optional (ADR-0045): the zone's GS1 Global Location Number, omitted when none was recorded.
A zone's traffic mode (PEDESTRIAN, ROBOT_ONLY or SHARED) was declared or changed.
Raised by DeclareZoneTrafficMode (ADR-0049), i.e. PUT /zones/{zoneId}/traffic-mode, whenever the declared mode differs from the zone's current one; declaring the current mode publishes nothing. The zone is identified by zoneId, exactly as in ZoneRegistered, which never carries the mode (a zone is always registered PEDESTRIAN and its mode is declared after). CloudEvents subject and Kafka key: zoneId (same partition as that zone's ZoneRegistered). A consumer keeping a per-zone copy applies last-write-wins per zoneId: PEDESTRIAN from ZoneRegistered implicitly, and every ZoneTrafficModeDeclared thereafter. This is a structural fact about the building, not a safety function and not a reservation: the fleet controller decides who goes where.
A physical corridor was added inside a Zone.
Raised by RegisterAisle. Kafka key: aisleId. No consumer wired today.
A reusable slot shape/kind was defined.
Raised by RegisterLocationType. Kafka key: locationType. No consumer wired today.
A rule constraining which LocationTypes are legal in which Zones was declared.
Raised by DefinePlacementRule. Kafka key: ruleId. No consumer wired today.
A coded leaf slot now exists on the warehouse map.
Raised by RegisterLocationSlot, and once per successful row of ImportFacilityLayout. Kafka key: locationCode. Consumed live by inventory-storage's location-classification cache, which joins the slot to its parent zone's attributes via zoneId. gln and spotKind are additive and optional (ADR-0045): the slot's GS1 Global Location Number and, on a Yard slot only, what the spot is for; both are omitted when none was recorded, so the payload of every existing slot is byte-identical to before. They are set at registration only; there is no update event for them yet.
A slot's handling unit (EACH, CASE or PALLET) was set or changed.
Raised by DeclareLocationHandlingUnit (ADR-0040), i.e. PUT /locations/{locationCode}/handling-unit. The slot is identified by locationCode, exactly as in LocationSlotRegistered. CloudEvents subject and Kafka key: locationCode (same partition as that location's LocationSlotRegistered). Consumed live by inventory-storage's facility cache, which uses the handling unit to decide whether a sealed case may be stowed in the bin. Last write wins per locationCode (same partition, so ordered).
A coded slot was permanently retired.
Raised by DecommissionLocationSlot. Kafka key: locationCode. Consumed live by inventory-storage's location-classification cache, which evicts the slot (its stow placement check then fails open for that location, by design). Decommissioning is irreversible — there is no compensating event.
A bulk layout import completed.
Raised once per ImportFacilityLayout call, summarising rows submitted/imported/rejected — in addition to, not instead of, the per-slot LocationSlotRegistered events for each successful row. Kafka key: the event's CloudEvents id (no single aggregate identity — a batch outcome — so batches spread across partitions; ordering against other events is not guaranteed); CloudEvents subject: the fixed batch identity layout-import. No consumer wired today.
A coded slot's physical position/footprint was set or changed.
Raised by SetLocationGeometry (ADR-0017). CloudEvents subject: locationCode. Kafka key: locationCode (same partition as that location's LocationSlotRegistered). No consumer wired today.
An aisle's travel centreline was set or changed.
Raised by SetAisleGeometry (ADR-0017): the straight-line path the travel graph uses as this aisle's walkable route. CloudEvents subject: aisleId. Kafka key: aisleId (same partition as that aisle's AisleRegistered). No consumer wired today.
A site-scoped physical obstacle was added to the warehouse map.
Raised by RegisterFixedStructure (ADR-0017): a wall, column, office, conveyor, or other fixed object. Not a location — nothing can be stowed at it. CloudEvents subject: structureId. Kafka key: structureId. No consumer wired today.
A connection between two aisles was added to the travel graph.
Raised by RegisterCrossAisle (ADR-0017): a zone-scoped connection between two of its aisles at a bay ordinal, letting the travel graph route between aisles without walking to either end. CloudEvents subject: <zoneId>/<fromAisle>-<toAisle>@<atBay> (the cross-aisle's composite identity), which is also its Kafka key. No consumer wired today.
CloudEvents 1.0 structured-mode envelope (ADR-0024). Every attribute below is REQUIRED in this fleet. data carries the domain event's own JSON verbatim.
Fields present in every event's data payload — the domain event base struct's own serialization.
What a physical zone can hold, thermally.
How an aisle may be traversed.
A site's role in the fulfilment network (ADR-0037). UNSPECIFIED means not classified yet.