Skip to main content

Event catalogue

Summary of apis/asyncapi.yaml (AsyncAPI 3.0.x). The file is the authority for payload fields; ADR 0004 is the type catalogue and Domain events carries the field-level detail.

Envelope​

Every message, published or consumed, is a CloudEvents 1.0 event in structured content mode with the Kafka header content-type: application/cloudevents+json; charset=UTF-8.

AttributeValue
specversion1.0
idUUID minted once per domain event at enqueue and persisted with the outbox row; consumers dedupe on it
source/warehouse/exception-management
typecom.warehouse.wes.exception-management.<entity>.<EventName> with <entity> exceptioncase or exceptionpolicy
subjectthe case id (the source type for the policy event) — also the Kafka key
timedomain occurred-at, UTC
datacontenttypeapplication/json
dataschemaurn:warehouse:exception-management:events:<EventName>:v1

A breaking payload change gets a new .v2 type and dataschema; an existing one is never mutated.

Published​

Topic warehouse.exception-management.events, written by the outbox relay only (ADR 0005). The analytics mirror topic (warehouse.exception-management.analytics, ADR 0004 and ADR 0013) is consumed by this repository's own cmd/exceptions-projector (seven types, see Observability); no other consumer of it is evidenced.

Type suffixRaisedPayload (data)
exceptioncase.ExceptionOpeneda source fact opens a case (first occurrence of the dedup key)case_id, source_type, source_subject, site_id (nullable), severity, queue, opened_at, sla_due_at, source_event_id, source_payload (object, frozen)
exceptioncase.ExceptionTriagedPOST /exceptions/{caseId}/triagecase_id, severity, queue, actor, at
exceptioncase.ExceptionAssignedPOST /exceptions/{caseId}/assigncase_id, assignee, actor, at
exceptioncase.ExceptionEscalatedthe SLA sweeper flags a breachcase_id, sla_due_at, at
exceptioncase.ExceptionResolvedPOST /exceptions/{caseId}/resolve (terminal)case_id, resolution_code, root_cause, note (nullable), actor, at
exceptioncase.ExceptionAutoResolveda policy auto-resolve rule fires on the correlated factcase_id, rule_id, correlated_type, correlated_event_id, at
exceptionpolicy.ExceptionPolicyDeclaredPUT /exception-policies/{sourceType} (subject and key = the source type)source_type, version, severity, queue, sla_minutes, auto_resolve (nullable: {on_type, within_minutes})

Touch raises nothing: the occurrence count and the audit trail are the record — a repeat fact is visible on the case, not on the wire. Outbox rows the encoder refuses, or that exhaust OUTBOX_MAX_ATTEMPTS, are dead-lettered to warehouse.exception-management.events.dlq (Runbook).

Consumed​

Seventeen case sources, two held-stock closing facts and one correlation fact (twenty types), read by eleven consumers, each under its pinned consumer group. Dispatch is on the FULL type; every other type on those topics is ignored (commit past).

TypeTopicConsumer group env
com.warehouse.wes.fulfillment-execution.task.TaskCPTMissedwarehouse.fulfillment.eventsFULFILLMENT_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wes.fulfillment-execution.package.PackageDivertedwarehouse.fulfillment.eventsFULFILLMENT_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wes.fulfillment-execution.package.WeightDiscrepancyDetectedwarehouse.fulfillment.eventsFULFILLMENT_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wes.work-planning.workpool.BacklogThresholdBreachedwarehouse.work-planning.eventsWORK_PLANNING_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wes.network-fulfillment.networkorder.AcknowledgementDeadlineAtRiskwarehouse.network-fulfillment.eventsNETWORK_FULFILLMENT_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wes.network-fulfillment.networkorder.OrphanedHoldCancelledwarehouse.network-fulfillment.eventsNETWORK_FULFILLMENT_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wms.inventory-storage.bin.DiscrepancyDetectedwarehouse.inventory.eventsINVENTORY_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wms.inventory-storage.stock.ItemUnlocatedwarehouse.inventory.eventsINVENTORY_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wms.inventory-storage.stock.StockHeldwarehouse.inventory.eventsHELD_STOCK_EXCEPTIONS_CONSUMER_GROUP (ADR 0012: one case per held unit)
com.warehouse.wms.inventory-storage.stock.StockReleasedwarehouse.inventory.eventsHELD_STOCK_EXCEPTIONS_CONSUMER_GROUP (auto-resolve, released note)
com.warehouse.wms.inventory-storage.stock.StockDispositionedwarehouse.inventory.eventsHELD_STOCK_EXCEPTIONS_CONSUMER_GROUP (auto-resolve; REWORK keeps the case open)
com.warehouse.wms.returns-processing.returnreceipt.UnexpectedReturnReceivedwarehouse.returns-processing.eventsRETURNS_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wms.inbound-receiving.receipt.CartonDiscrepancyRaisedwarehouse.inbound-receiving.eventsCARTON_DISCREPANCY_CONSUMER_GROUP
com.warehouse.wms.yard-management.yardvisit.VisitRejectedwarehouse.yard-management.eventsYARD_MANAGEMENT_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wms.yard-management.trailer.SealExceptionRaisedwarehouse.yard-management.eventsYARD_MANAGEMENT_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wms.yard-management.trailer.TrailerDwellExceededwarehouse.yard-management.eventsYARD_MANAGEMENT_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wms.yard-management.yardcheck.YardCheckClosedwarehouse.yard-management.eventsYARD_MANAGEMENT_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentNoShowwarehouse.dock-scheduling.eventsDOCK_SCHEDULING_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wms.outbound-shipping.shippingpackage.PackageMissedLoadwarehouse.outbound-shipping.eventsOUTBOUND_SHIPPING_EXCEPTIONS_CONSUMER_GROUP
com.warehouse.wes.order-management.order.OrderRepromisedwarehouse.order-management.eventsORDER_CORRELATION_CONSUMER_GROUP — correlation only, never a case source

Roadmap, not consumed: workforce-management PathUnderstaffed and network-inventory-planning TransferStuckDetected — analytics-topic-only on the producers today; promotion pending.

Processing rules: dedupe on the CloudEvents id in the same transaction as the effect; commit the offset only after success; anything that is not a valid CloudEvent is WARN-logged and skipped; a fact whose source type has no declared policy is WARN-logged and committed past (Troubleshooting); a payload that can never apply dead-letters to <topic>.dlq at once.