Skip to main content

Event catalogue

Every Kafka message this service produces or consumes is a CloudEvents 1.0 event in structured mode: the Kafka value is the whole JSON envelope and the header content-type is application/cloudevents+json; charset=UTF-8. Envelopes are built and decoded only in internal/adapters/kafka/cloudevents, which is on develop (ADR 0004). The contract is apis/asyncapi.yaml; field-level detail is on Domain events.

:::info Built, with caveats The outbox publisher and relay (internal/adapters/outbound/{events,outbox}) and the two consumers (internal/adapters/inbound/kafka) are on develop and are the only runtime of cmd/api: the relay and both consumers are always on, so the service needs DATABASE_URL, KAFKA_BROKERS and both consumer group ids to boot. The tables below are the pinned contract, not observed traffic. Whether the other side of each edge exists is on Integration. :::

Published​

Source /warehouse/task-interleaving, dataschema urn:warehouse:task-interleaving:<events|analytics>:<EventName>:v1. The Kafka key and subject are the station id for hint events and the site id for the policy event.

TypeTopicsRaised whendata
com.warehouse.wes.task-interleaving.stationtrip.InterleavingHintIssuedwarehouse.task-interleaving.events and warehouse.task-interleaving.analyticsa hint is issued for a stationhint_id, station_id, site_id, after_task_id, origin_location, expires_at, policy_version, candidates[{rank, task_id, task_type, location, detour_m}]
com.warehouse.wes.task-interleaving.stationtrip.InterleavingHintConsumedanalytics onlythe hinted station claims one of the candidateshint_id, station_id, site_id, task_id, rank, detour_m, consumed_at
com.warehouse.wes.task-interleaving.stationtrip.InterleavingHintExpiredanalytics onlyan Active hint reaches its expires_athint_id, station_id, site_id, expires_at
com.warehouse.wes.task-interleaving.policy.InterleavingPolicyDeclaredanalytics onlya site's policy is declared or replacedsite_id, max_detour_m, max_candidates, hint_ttl_seconds, eligible_task_types, vertical_weight, version, declared_at

A superseded hint raises no event of its own: the next InterleavingHintIssued of the same station replaces it.

Consumed​

TypeTopicStatus
com.warehouse.wes.fulfillment-execution.task.TaskAvailablewarehouse.fulfillment.eventsverified on the producer's contract; announced for RELOCATE, REPLENISH and PICK tasks (a PICK only when its plan carries both the site and the pick face, producer ADR 0062); PACK, SLAM and REBIN are not announced
com.warehouse.wes.fulfillment-execution.task.TaskClaimedwarehouse.fulfillment.eventsverified on the producer's contract
com.warehouse.wes.fulfillment-execution.task.TaskCompletedwarehouse.fulfillment.eventsverified on the producer's contract
com.warehouse.wms.facility-layout.zone.ZoneRegisteredwarehouse.facility.eventsverified on the producer's contract
com.warehouse.wms.facility-layout.locationslot.LocationSlotRegisteredwarehouse.facility.eventsverified on the producer's contract
com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissionedwarehouse.facility.eventsverified on the producer's contract
com.warehouse.wms.facility-layout.locationslot.LocationGeometryUpdatedwarehouse.facility.eventsverified on the producer's contract

Every other type on those topics is ignored; a message that is not a valid CloudEvent is logged and skipped. Consumer groups come from the environment variables FULFILLMENT_CONSUMER_GROUP and LAYOUT_CONSUMER_GROUP (ADR 0003); cmd/api reads them only when the matching *_MODE is kafka. A message that fails is published to <topic>.dlq; see the Runbook.