Skip to main content

Integration

yard-management calls no other service. Everything it needs from a sibling arrives as a Kafka event and is kept in a local copy (ADR 0003, ADR 0009); everything it tells the others leaves through the transactional outbox. The only synchronous traffic is people, the floor client and the console calling its REST API, and agents calling MCP. The broker is the platform's single Kafka; the edge is Kong at :8000 under /api/yard-management.

Neighbour classifications are on Context map; the message shapes are on Domain events and the Event catalogue.

Upstream (consumed)​

UpstreamProtocol and topicContract (type suffixes)What it feedsFailure behaviour
dock-schedulingKafka warehouse.dock-scheduling.events, group DOCK_SCHEDULING_CONSUMER_GROUPdockappointment.DockAppointmentBooked, …Rescheduled, …Cancelled, …NoShow; dockcalendar.DoorClosureScheduled, …DoorClosureLifted; carrier.CarrierRegistered, …CarrierSuspended, …CarrierReinstatedappointments, door_closures, carriers copies (the carrier copy is read by the suspended-carrier rule of the gate, ADR 0016); gates check-in (appointment-required, unknown-appointment), directs a trailer to its door, refuses a closed door (door-closed); NoShowFreesHolding cancels the open TO_DOOR move on no-show or cancellationtransient failure: the same message is retried forever (200 ms to 5 s backoff), blocking its partition; a payload without version or window is poison and goes to warehouse.dock-scheduling.events.dlq; dock-scheduling down: the copy goes stale, check-in still works on what it has
facility-layoutKafka warehouse.facility.events, group FACILITY_CONSUMER_GROUPzone.ZoneRegistered, locationslot.LocationSlotRegistered, locationslot.LocationSlotDecommissioned (camelCase payloads)zones, locations: Yard slots are spots, Dock slots are doors with a dockFlow; zone to site codesame; with no location copy for a site the yard board is site-not-found and moves/check-ins cannot find a destination
inbound-receivingKafka warehouse.inbound-receiving.events, group INBOUND_RECEIVING_CONSUMER_GROUPasn.ASNRegistered, asn.ASNCancelled, receipt.ReceiptOpened, receipt.ReceiptClosedasns (which ASNs a trailer holds; decides door flow compatibility), receipts; AutoCompleteUnload completes the door work on ReceiptClosedsame
Own analytics topicKafka warehouse.yard-management.analytics, group ANALYTICS_CONSUMER_GROUPthe 23 published types, analytics dataschemaanalytics.* tables via cmd/yard-projectora dying consumer exits the projector so the pod restarts; a new group replays from the first offset

Consumers ignore types they do not handle, skip messages that are not CloudEvents (WARN), and are idempotent on the CloudEvents id (processed_events).

Downstream (published)​

DownstreamProtocol and topicTypes it reads (from its own code on origin/develop)What it doesFailure behaviour on this side
dock-schedulingKafka warehouse.yard-management.eventsVisitCheckedIn, VisitRejected, TrailerDocked, TrailerUndockedapplies arrival, the actual door and door release; cancels the appointment with TURNED_AWAY on rejectionnone: yard-management does not know or wait for consumers; unconsumed events stay in the topic
inbound-receivingKafka warehouse.yard-management.eventsVisitCheckedIn only (its ADR 0021; every other type is committed past)keeps the visit_arrivals local copy for its dock-to-stock KPIsame
outbound-shippingKafka warehouse.yard-management.eventsTrailerDocked, DoorWorkCompleted, TrailerDepartedconfirms a shipment when the trailer leavessame
exception-managementKafka warehouse.yard-management.eventsVisitRejected, SealExceptionRaised, TrailerDwellExceeded, YardCheckClosedopens problem cases (one per yard-check discrepancy)same
floor client, console, ops agentREST :8080 via Kong; MCP :8090 (MCP is switched off on k3s, read 2026-11-10: no pod, no route)API overview, MCP toolsgate, hostler, dock, supervisor screens; agent proposalsidempotent writes: retry with the same key; 503 dependency-unavailable when Postgres or Kafka is down
any contextREST GET /visits, /trailers, /moves, /sites/{siteId}/yard-board, /sites/{siteId}/yard-policy, /reports/*read-only Open Host Servicediagnostics and tools; no context needs it for a decisionn/a
Kubernetes CronJobsREST POST /dwell-sweeps, /move-lease-sweepsthe chart's two CronJobstime-driven rulesa failed Job keeps its logs; the next run repeats safely. Switched off on k3s (read 2026-11-10): no CronJob exists, call the endpoints by hand

Delivery on the producing side is at least once: the relay may republish a row with the same CloudEvents id, so every consumer must dedupe on it. Per-aggregate order holds per key and partition; a row that hit the attempt cap is excluded and later rows overtake it (Troubleshooting).

Edge status​

Read-only on 2026-11-10 (kubectl get pods,deploy -n warehouse-systems, context k3s-multipass). An edge is live only when both ends run in the cluster and the consumer or producer code and the spec declare it. yard-management is applied (Argo application Synced and Healthy, api and relay pods Ready at v0.1.2; see the Runbook), so an edge is live when the neighbour also runs. The groups are those of the warehouse-infra helm values (helm-values/yard-management.yaml and the neighbour's own file) and of the running Deployments' environment. "Live" here means both ends run and declare the edge; it does not say events flow without lag: consumer group offsets and lag need kubectl exec and were not read.

EdgeDirectionConsumer groupNeighbour in the cluster (image running)Status
dock-schedulingin: warehouse.dock-scheduling.eventsyard-management-dock-schedulingdock-scheduling api Ready (d5db895, v0.1.2)live
dock-schedulingout: warehouse.yard-management.eventsdock-scheduling-yardsame pod; its yard_consumer.golive
facility-layoutin: warehouse.facility.eventsyard-management-facilityfacility-layout Ready (1305245)live
inbound-receivingin: warehouse.inbound-receiving.eventsyard-management-inbound-receivinginbound-receiving Ready (484490f, v2.0.6)live
inbound-receivingout: warehouse.yard-management.events (VisitCheckedIn only)inbound-receiving-visit-arrivalssame pod; visit_arrival_consumer.go at 484490f; the Deployment carries VISIT_ARRIVAL_CONSUMER_GROUPlive (see the spec note below)
exception-managementout: warehouse.yard-management.eventsexception-management-yard-managementexception-management Ready (35bb7d9); yard_exceptions_consumer.go; the Deployment carries YARD_MANAGEMENT_EXCEPTIONS_CONSUMER_GROUPlive
outbound-shippingout: warehouse.yard-management.eventsnone: no warehouse-infra entry or helm values found for itno pod (kubectl get deploy outbound-shipping: NotFound)not live, not registered in infra
own projectorin: warehouse.yard-management.analyticsyard-management-analyticsnone: analytics.enabled: false, no yard-management-projector podnot live: the relay writes the topic, nothing consumes it

The event types a neighbour reads come from the neighbours' own code and specs at the commit each pod runs (the image tag is that commit), as the tables above say; the group and neighbour columns come from warehouse-infra origin/develop and the cluster listing. The exception-management row was "not wired in infra" until its group ids were pinned (warehouse-infra commit a703971, 2026-11-09); the running Deployment carries it. Spec note: this service's apis/asyncapi.yaml used to name inbound-receiving as a consumer of TrailerDocked, not of VisitCheckedIn; it now names it as a consumer of VisitCheckedIn, as the inbound-receiving spec and code declare (its ADR 0021).

Not verified: the offsets and lag of every group, whether the topics hold the events a consumer expects, and delivery from the relay. The api log of the yard pod shows kafka reader error; retrying lines with i/o timeout on the dock-scheduling, inbound-receiving and facility topics at 09:19Z to 09:43Z and 23:21Z on 2026-11-10 (quoted in the Runbook); they were not diagnosed.

Edges that do not exist​

  • inbound-receiving does not consume TrailerDocked. Its consumer reads only VisitCheckedIn (its ADR 0021) and commits every other type on the topic past. The optional door-confirm consumer was not built.
  • No call to a sibling's REST API, in either direction. There is no HTTP client in the code.
  • No retail-network edge. No retailnetwork.* topic is consumed and no retail-network service is called; the only channel to the network stays network-fulfillment.
  • No A2A endpoint and no authentication anywhere.
  • No consumer of the analytics topic other than this service's own projector.
  • No live edge to outbound-shipping. It is merged on develop but has no warehouse-infra entry and no pod; see Edge status.