Skip to main content

Event catalogue

Contract: apis/asyncapi.yaml (AsyncAPI 3.0; channels have friendly keys and the topic is in address:). Every message is a CloudEvents 1.0 structured JSON message (application/cloudevents+json) built only by internal/adapters/kafka/cloudevents: id, source /warehouse/yard-management, type, subject, time, datacontenttype and dataschema (urn:warehouse:yard-management:<events|analytics>:<EventName>:v1) are required. type = com.warehouse.wms.yard-management.<entity>.<EventName>; data is snake_case, times are RFC 3339 UTC, version is the aggregate version. The Kafka key and the CloudEvents subject are the aggregate root id. A breaking change is a new .v2 type. Every field of every payload is on Domain events.

Channels​

Channel key (AsyncAPI)Topic (address)DirectionWritten or read by
yardManagementEventswarehouse.yard-management.eventsproducedcmd/relay; the thirteen integration types
yardManagementAnalyticswarehouse.yard-management.analyticsproducedcmd/relay in the same pass: the thirteen integration types again (same id, byte-identical data, analytics dataschema) plus ten analytics-only types; consumed only by cmd/yard-projector
(none in AsyncAPI)warehouse.yard-management.events.dlqproducedoutbox rows that can never be encoded, verbatim (header dlq-reason)
dockSchedulingEventswarehouse.dock-scheduling.eventsconsumedcmd/api consumer, group DOCK_SCHEDULING_CONSUMER_GROUP
facilityEventswarehouse.facility.eventsconsumedcmd/api, group FACILITY_CONSUMER_GROUP
inboundReceivingEventswarehouse.inbound-receiving.eventsconsumedcmd/api, group INBOUND_RECEIVING_CONSUMER_GROUP

Published types (23)​

Rows are in the order of the encoder's catalogue (published in internal/adapters/outbound/kafka/encoder.go); a row outside it is poison and is dead-lettered. The consumers named are the ones whose code reads the type on origin/develop of the sibling repository.

CloudEvents typeEventTopicsConsumers
com.warehouse.wms.yard-management.yardvisit.VisitCheckedInVisitCheckedInevents + analyticsdock-scheduling, inbound-receiving
com.warehouse.wms.yard-management.yardvisit.VisitRejectedVisitRejectedevents + analyticsdock-scheduling, exception-management
com.warehouse.wms.yard-management.yardvisit.VisitCheckedOutVisitCheckedOutanalytics onlythis service's projector
com.warehouse.wms.yard-management.trailer.TrailerDockedTrailerDockedevents + analyticsdock-scheduling, outbound-shipping
com.warehouse.wms.yard-management.trailer.TrailerUndockedTrailerUndockedevents + analyticsdock-scheduling
com.warehouse.wms.yard-management.trailer.SealExceptionRaisedSealExceptionRaisedevents + analyticsexception-management
com.warehouse.wms.yard-management.trailer.TrailerDwellExceededTrailerDwellExceededevents + analyticsexception-management
com.warehouse.wms.yard-management.trailer.TrailerParkedTrailerParkedanalytics onlythis service's projector
com.warehouse.wms.yard-management.trailer.DoorWorkStartedDoorWorkStartedanalytics onlythis service's projector
com.warehouse.wms.yard-management.trailer.DoorWorkCompletedDoorWorkCompletedevents + analyticsoutbound-shipping
com.warehouse.wms.yard-management.trailer.TrailerDepartedTrailerDepartedevents + analyticsoutbound-shipping
com.warehouse.wms.yard-management.trailer.TrailerHeldTrailerHeldanalytics onlythis service's projector
com.warehouse.wms.yard-management.trailer.TrailerHoldReleasedTrailerHoldReleasedanalytics onlythis service's projector
com.warehouse.wms.yard-management.trailer.TrailerSecuredTrailerSecuredevents + analyticsnone yet (ADR 0013)
com.warehouse.wms.yard-management.trailer.TrailerSecuringReleasedTrailerSecuringReleasedevents + analyticsnone yet (ADR 0013)
com.warehouse.wms.yard-management.yardmove.YardMoveRequestedYardMoveRequestedanalytics onlythis service's projector
com.warehouse.wms.yard-management.yardmove.YardMoveClaimedYardMoveClaimedanalytics onlythis service's projector
com.warehouse.wms.yard-management.yardmove.YardMoveLeaseExpiredYardMoveLeaseExpiredanalytics onlythis service's projector
com.warehouse.wms.yard-management.yardmove.YardMoveCompletedYardMoveCompletedanalytics onlythis service's projector
com.warehouse.wms.yard-management.yardmove.YardMoveCancelledYardMoveCancelledanalytics onlythis service's projector
com.warehouse.wms.yard-management.yardcheck.YardCheckClosedYardCheckClosedevents + analyticsexception-management
com.warehouse.wms.yard-management.inspection.InspectionCompletedInspectionCompletedevents + analyticsnone yet (ADR 0015)
com.warehouse.wms.yard-management.inspection.InspectionFailedInspectionFailedevents + analyticsnone yet; exception-management is the planned consumer (ADR 0015)

Totals: 13 integration types (events and analytics), 10 analytics-only. TestEventCatalogueMatchesContract ties this list to the AsyncAPI document, and the integration/analytics split is decided by the encoder, not by the emitter.

Standard vocabulary on the facts (ADR 0018)​

A fact whose meaning a standard states exactly carries, as ADDITIVE optional data fields, x12_status (the ANSI X12 214 shipment status code), cbv_biz_step and cbv_disposition (GS1 EPCIS Core Business Vocabulary 2.0, in their URN form). A field with no honest value is omitted (never null), so a payload that carries none is byte-for-byte what it was before.

Eventx12_statuscbv_biz_stepcbv_disposition
VisitCheckedInI1 (In-Gate)urn:epcglobal:cbv:bizstep:arriving
VisitCheckedOutOA (Out-Gate)urn:epcglobal:cbv:bizstep:departing
TrailerDepartedOA (Out-Gate)urn:epcglobal:cbv:bizstep:departing
InspectionCompletedurn:epcglobal:cbv:bizstep:inspectingurn:epcglobal:cbv:disp:conformant (outcome PASSED), urn:epcglobal:cbv:disp:non_conformant (FAILED)
InspectionFailedurn:epcglobal:cbv:bizstep:inspectingurn:epcglobal:cbv:disp:non_conformant
TrailerHeldurn:epcglobal:cbv:disp:damaged (reason DAMAGED), urn:epcglobal:cbv:disp:container_open (SEAL_BROKEN)

The other seventeen types never carry them, and TrailerHeld for NOT_FOUND, QUALITY and SECURITY carries none. The table is internal/domain/standards; every decision, its reason and its source (X12 element 1650, GS1 CBV 2.0) is in ADR 0018.

Consumed types (16)​

TopicCloudEvents typeEffect here
warehouse.dock-scheduling.eventscom.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentBooked, …DockAppointmentRescheduled, …DockAppointmentCancelled, …DockAppointmentNoShowappointment copy; NoShowFreesHolding on no-show and cancellation
warehouse.dock-scheduling.eventscom.warehouse.wms.dock-scheduling.dockcalendar.DoorClosureScheduled, …DoorClosureLifteddoor-closure copy
warehouse.dock-scheduling.eventscom.warehouse.wms.dock-scheduling.carrier.CarrierRegistered, …CarrierSuspended, …CarrierReinstatedcarrier copy read by the suspended-carrier rule of the gate (ADR 0016)
warehouse.facility.eventscom.warehouse.wms.facility-layout.zone.ZoneRegistered, …locationslot.LocationSlotRegistered, …locationslot.LocationSlotDecommissionedlocation copy (Yard slots are spots, Dock slots are doors with a dock flow)
warehouse.inbound-receiving.eventscom.warehouse.wms.inbound-receiving.asn.ASNRegistered, …asn.ASNCancelled, …receipt.ReceiptOpened, …receipt.ReceiptClosedASN content and receipt-at-door copies; AutoCompleteUnload on ReceiptClosed

Consumers dispatch on the full type; an unknown type is ignored, a message that is not a valid CloudEvent is skipped with a WARN, a poison message of a handled type goes to <topic>.dlq. Effects are idempotent on the CloudEvents id (processed_events). See Runbook.

Delivery semantics​

  • Transactional outbox. The aggregate change and its outbox rows commit in one transaction; cmd/relay publishes at least once with acks=all, keyed by the aggregate id (the 8 partitions keep one aggregate's events ordered), and the persisted id makes a republish dedupe-able.
  • Ordering. Per aggregate, per partition. A row that reaches the attempt cap is excluded and later rows overtake it (ADR 0004, ADR 0005).
  • MCP attribution. An event raised by an MCP write carries initiated_by {via, proposal_id, approved_by, agent_id} in its data.
  • Integration events added by ADR 0010: DoorWorkCompleted and TrailerDeparted on the integration topic.

Discrepancies​

  • inbound-receiving consumes VisitCheckedIn from the yard topic and no other type (internal/adapters/inbound/kafka/visit_arrival_consumer.go in inbound-receiving on origin/develop, its ADR 0021); it does not consume TrailerDocked. The descriptions in apis/asyncapi.yaml that named it as a consumer of TrailerDocked were corrected on 2026-11-13.