Skip to main content

4. CloudEvents catalogue

Status: Accepted. Every message is CloudEvents 1.0 structured JSON built by internal/adapters/kafka/cloudevents: source /warehouse/dock-scheduling, subject = aggregate id (appointment id, site id for calendar events, SCAC for carrier events), time = the domain instant (UTC), datacontenttype application/json, dataschema urn:warehouse:dock-scheduling:events:<EventName>:v1 (urn:warehouse:dock-scheduling:analytics:<EventName>:v1 on the analytics stream). Kafka key = subject. Topics warehouse.dock-scheduling.events (integration) and warehouse.dock-scheduling.analytics (this service's read side; every published fact appears there too, with the same id and type). Payload data is snake_case, times RFC 3339 UTC. Subdomain wms.

One type: line per published type and stream:

EventStreamConsumerstype
DockAppointmentBookedeventsyard-management, warehouse-planning, inbound-receivingtype: com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentBooked
DockAppointmentRescheduledeventsyard-management, warehouse-planningtype: com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentRescheduled
DockAppointmentCancelledeventsyard-management, warehouse-planning, inbound-receivingtype: com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentCancelled
DockAppointmentNoShoweventsyard-management, warehouse-planning, exception-managementtype: com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentNoShow
DockAppointmentCheckedInanalytics onlyanalytics onlytype: com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentCheckedIn
DockAppointmentDoorReassignedevents (per ADR 0010)inbound-receivingtype: com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentDoorReassigned
DockAppointmentCompletedanalytics onlyanalytics onlytype: com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentCompleted
DockAppointmentAtRiskanalytics onlyanalytics onlytype: com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentAtRisk
DoorClosureScheduledevents (key site_id)yard-managementtype: com.warehouse.wms.dock-scheduling.dockcalendar.DoorClosureScheduled
DoorClosureLiftedevents (key site_id)yard-managementtype: com.warehouse.wms.dock-scheduling.dockcalendar.DoorClosureLifted
DoorOperatingHoursDeclaredanalytics only (key site_id)analytics onlytype: com.warehouse.wms.dock-scheduling.dockcalendar.DoorOperatingHoursDeclared
CarrierRegisteredevents (key scac, per ADR 0012)yard-management (the carrier registry copy, ADR 0016 / YF-1)type: com.warehouse.wms.dock-scheduling.carrier.CarrierRegistered
CarrierSuspendedevents (key scac, per ADR 0012)yard-management (the carrier registry copy, ADR 0016 / YF-1)type: com.warehouse.wms.dock-scheduling.carrier.CarrierSuspended
CarrierReinstatedevents (key scac, per ADR 0012)yard-management (the carrier registry copy, ADR 0016 / YF-1)type: com.warehouse.wms.dock-scheduling.carrier.CarrierReinstated

Analytics-only events go ONLY to warehouse.dock-scheduling.analytics. The version of an appointment event is the aggregate version after the change; calendar events carry the DockCalendar version; carrier events (ADR 0012, subject and key = the SCAC) carry the Carrier version. DockAppointmentAtRisk has no version (it is advisory and does not change the aggregate beyond the ETA report that caused it).

Data fields per event are the AsyncAPI schemas in apis/asyncapi.yaml and the golden JSON files in internal/adapters/outbound/kafka/testdata. Locations are not nested objects in these payloads: door_code is the facility-layout location code.

Consumed types are catalogued in ADR 0003. A breaking payload change is a new .v2 type with a :v2 dataschema.

Addendum 2026-11-13: current state​

Two consumer cells in the table above are out of date, read from each sibling's origin/develop: DockAppointmentBooked is also consumed by outbound-shipping (internal/adapters/inbound/kafka/dock_yard_consumers.go, handler at line 52), and DockAppointmentRescheduled is also consumed by inbound-receiving (internal/adapters/inbound/kafka/dock_appointment_consumer.go, case at line 165, its appointments copy).