Event catalog for the product-master bounded context (WMS subdomain): SKU-level product master data, i.e. handling classification, the physical profile and the packaging hierarchy with GS1 GTINs (ADR 0001, ADR 0002, ADR 0011).
Published. The Product aggregate raises eight events, published to
warehouse.product-master.events through a transactional outbox: the
product row and its already-encoded events are written in ONE database
transaction and a relay drains them to Kafka (at-least-once; the CloudEvents
id is stored with the outbox row, so a retry republishes the same id).
A change that alters nothing raises no event.
Packaging hierarchy (ADR 0011). Three events carry the pack levels
(EACH | INNER | CASE | PALLET) of a SKU. They are additive and
integration-only (NOT written to the analytics stream). A GTIN is always
the 14-digit zero-left-padded string. Eaches are the ledger unit: qty_of_child
and units_per_pack are the only pack quantities, a bare quantity never
changes meaning. units_per_pack is the direct factor to eaches. Once a
level is active its quantities never change: a new content quantity is a
new GTIN at that level (declaring it end-dates the old level with a
ProductPackLevelRetired, reason superseded, in the same transaction,
one version apart). An end-dated level is kept: resolve a GTIN of an
in-flight ASN from your local copy, which must keep retired levels.
Dates and timestamps are RFC 3339 UTC.
Local copies, not lookups. Sibling contexts (inventory-storage,
order-management, wes-work-planning, fulfillment-execution) keep a local
copy keyed by SKU. Every payload carries the aggregate version after the
change; apply a message only when its version is greater than the stored
one. Payloads are full-state per concern (classification, physical profile),
so a consumer overwrites, it never merges.
Analytics (ADR 0006). The same five events are ALSO written, in the
same transaction, to warehouse.product-master.analytics with the same
type and the same id per occurrence, dataschema
urn:warehouse:product-master:analytics:<EventName>:v1 and payloads equal
to the integration payloads. Only this service's product-projector
consumes it; it is not an integration contract.
Envelope (mandatory). CloudEvents 1.0, structured content mode, Kafka
header content-type: application/cloudevents+json; charset=UTF-8.
Optional W3C trace-context headers (traceparent, and tracestate /
baggage when present) carry the trace of the request that wrote the
outbox row (ADR 0009); consumers may extract them, and must not require
them.
specversion, id, source (/warehouse/product-master), type,
subject (the SKU), time, datacontenttype (application/json) and
dataschema (urn:warehouse:product-master:events:<EventName>:v1) are all
required. Kafka key = the SKU. Type =
com.warehouse.wms.product-master.product.<EventName>. A breaking payload
change is a new .v2 type, never a mutation.
Fleet-shared Kafka broker (host supplied by the deployment environment).
This service's integration topic. Written by the outbox relay; key = SKU;
every message carries the CloudEvents content-type header (plus the
optional W3C traceparent of the writing request). Dispatch on the
full type, ignore unknown types, dedupe on id, apply by version.
Receive Product events.
Subscribe to the product master data stream. Route on the full type
(com.warehouse.wms.product-master.product.<EventName>).
Available only on servers:
Accepts one of the following messages:
A SKU was registered as a product.
type = com.warehouse.wms.product-master.product.ProductRegistered; subject and key = the SKU.
SKU-1 registered.
{
"specversion": "1.0",
"id": "1b0c9a4e-2f7d-4a63-9d1e-5a7c3e2b9f10",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductRegistered",
"subject": "SKU-1",
"time": "2026-10-06T21:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductRegistered:v1",
"data": {
"sku": "SKU-1",
"description": "Lithium battery pack 12V",
"version": 1
}
}
A registered product's description changed.
type = com.warehouse.wms.product-master.product.ProductDescriptionChanged; subject and key = the SKU.
SKU-1's description changed.
{
"specversion": "1.0",
"id": "8d3f2c1a-6b5e-4f7a-9c0d-1e2f3a4b5c6d",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductDescriptionChanged",
"subject": "SKU-1",
"time": "2026-10-06T21:01:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductDescriptionChanged:v1",
"data": {
"sku": "SKU-1",
"description": "Lithium battery pack 12V, 7Ah",
"version": 2
}
}
A product's handling classification was set or replaced.
type = com.warehouse.wms.product-master.product.ProductClassified;
subject and key = the SKU. Full-state replacement of the
classification. sku, handling_tags, temperature_class and
dot_hazard_class keep the field names of inventory-storage's v1
payload (ADR 0004). Optional fields are omitted when unset.
SKU-1 classified Hazmat + TemperatureSensitive (Frozen), DOT class 3.
{
"specversion": "1.0",
"id": "0f6d8a2b-3c4e-4d5f-8a9b-7c6d5e4f3a2b",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductClassified",
"subject": "SKU-1",
"time": "2026-10-06T21:02:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductClassified:v1",
"data": {
"sku": "SKU-1",
"handling_tags": [
"Hazmat",
"TemperatureSensitive"
],
"temperature_class": "Frozen",
"dot_hazard_class": 3,
"classification_source": "native",
"version": 3
}
}
Declared unit dimensions and weight were set or replaced.
type = com.warehouse.wms.product-master.product.ProductDimensionsDeclared;
subject and key = the SKU. Carries the FULL physical profile after the
change (ADR 0002); act on effective.
SKU-1 declared at 200x120x80 mm, 1500 g.
{
"specversion": "1.0",
"id": "5a4b3c2d-1e0f-4a9b-8c7d-6e5f4a3b2c1d",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductDimensionsDeclared",
"subject": "SKU-1",
"time": "2026-10-06T21:03:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductDimensionsDeclared:v1",
"data": {
"sku": "SKU-1",
"declared": {
"length_mm": 200,
"width_mm": 120,
"height_mm": 80,
"weight_g": 1500,
"volume_mm3": 1920000
},
"effective": {
"length_mm": 200,
"width_mm": 120,
"height_mm": 80,
"weight_g": 1500,
"volume_mm3": 1920000
},
"effective_source": "declared",
"discrepancy": false,
"version": 4
}
}
A measurement of one unit was recorded and is now effective.
type = com.warehouse.wms.product-master.product.ProductMeasured;
subject and key = the SKU. Carries the FULL physical profile after the
change (ADR 0002); act on effective.
SKU-1 measured heavier than declared (more than 10 %).
{
"specversion": "1.0",
"id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductMeasured",
"subject": "SKU-1",
"time": "2026-10-06T21:04:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductMeasured:v1",
"data": {
"sku": "SKU-1",
"declared": {
"length_mm": 200,
"width_mm": 120,
"height_mm": 80,
"weight_g": 1500,
"volume_mm3": 1920000
},
"measured": {
"length_mm": 205,
"width_mm": 121,
"height_mm": 82,
"weight_g": 1720,
"volume_mm3": 2034010,
"measured_at": "2026-10-06T14:05:00Z",
"device_id": "CUBISCAN-03"
},
"effective": {
"length_mm": 205,
"width_mm": 121,
"height_mm": 82,
"weight_g": 1720,
"volume_mm3": 2034010
},
"effective_source": "measured",
"discrepancy": true,
"version": 5
}
}
A pack level (EACH, INNER, CASE or PALLET) of a SKU was declared, or one of its mutable attributes changed.
type = com.warehouse.wms.product-master.product.ProductPackLevelDeclared;
subject and key = the SKU. Carries the FULL level after the change
(ADR 0011). child_gtin and qty_of_child are absent for EACH;
units_per_pack is 1 for EACH. dims are the DECLARED dimensions
(omitted when none); measurements arrive as ProductPackLevelMeasured.
Only dims, is_orderable and is_despatch_unit can change for a
GTIN already announced (the event is then re-sent in full); a new
content quantity is a new gtin.
SKU-1 declares a case of 12 eaches.
{
"specversion": "1.0",
"id": "3c2b1a09-8f7e-4d6c-9b5a-4a3b2c1d0e9f",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductPackLevelDeclared",
"subject": "SKU-1",
"time": "2026-10-06T21:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductPackLevelDeclared:v1",
"data": {
"sku": "SKU-1",
"level": "CASE",
"gtin": "24006381333935",
"child_gtin": "04006381333931",
"qty_of_child": 12,
"units_per_pack": 12,
"dims": {
"length_mm": 400,
"width_mm": 300,
"height_mm": 200,
"weight_g": 6500
},
"is_orderable": true,
"is_despatch_unit": true,
"effective_from": "2026-10-06T20:00:00Z",
"version": 3
}
}
A pack level was end-dated; its GTIN stays resolvable.
type = com.warehouse.wms.product-master.product.ProductPackLevelRetired;
subject and key = the SKU. reason is superseded when a new GTIN was
declared at the same level (the matching ProductPackLevelDeclared
follows with the next version), else the reason given to the retire
command. The GTIN is never reused. The levels above it are NOT retired
by this event: re-declare them.
The case GTIN was superseded by a new one.
{
"specversion": "1.0",
"id": "7b6a5948-3726-4150-8f9e-0d1c2b3a4958",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductPackLevelRetired",
"subject": "SKU-1",
"time": "2026-10-06T21:01:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductPackLevelRetired:v1",
"data": {
"sku": "SKU-1",
"level": "CASE",
"gtin": "24006381333935",
"effective_to": "2026-10-06T21:01:00Z",
"reason": "superseded",
"version": 4
}
}
A measurement of one pack of an active level was recorded.
type = com.warehouse.wms.product-master.product.ProductPackLevelMeasured;
subject and key = the SKU. The measurement of the declared-versus-measured
split (ADR 0002) per level; device_id is omitted for a manual one.
A cubiscan measured the case.
{
"specversion": "1.0",
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductPackLevelMeasured",
"subject": "SKU-1",
"time": "2026-10-06T21:02:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductPackLevelMeasured:v1",
"data": {
"sku": "SKU-1",
"level": "CASE",
"gtin": "24006381333935",
"dims": {
"length_mm": 410,
"width_mm": 310,
"height_mm": 210,
"weight_g": 6900
},
"measured_at": "2026-10-06T14:05:00Z",
"device_id": "CUBISCAN-03",
"version": 5
}
}
This service's analytics topic (AnalyticsTopic in
internal/adapters/outbound/kafka/analytics_encoder.go; ADR 0006).
Written by the SAME outbox relay, from rows inserted in the same
transaction as the integration rows (one CloudEvents id per occurrence
on both topics); key = SKU. Consumed ONLY by this service's
product-projector under a fixed consumer group read from env
ANALYTICS_CONSUMER_GROUP (at-least-once; the offset is committed after
the projection and the dedupe mark committed together in the analytical
database). The projector dedupes on id, ignores unknown types, skips
(with a rate-limited WARN) anything that is not CloudEvents 1.0, and
dead-letters a known type with an unusable payload to
warehouse.product-master.analytics.dlq (raw bytes plus x-dlq-*
headers). Not an integration contract: other contexts consume
warehouse.product-master.events.
Receive the Product analytics events.
Route on the full type; the payloads equal the integration payloads
(no analytics-only fields in v1). dataschema is
urn:warehouse:product-master:analytics:<EventName>:v1.
Available only on servers:
Accepts one of the following messages:
Product registered, on the analytics stream.
type = com.warehouse.wms.product-master.product.ProductRegistered (the same as on the integration topic); dataschema urn:warehouse:product-master:analytics:ProductRegistered:v1; payload equal to the integration payload.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "1b0c9a4e-2f7d-4a63-9d1e-5a7c3e2b9f10",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductRegistered",
"subject": "SKU-1",
"time": "2026-10-06T21:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:analytics:ProductRegistered:v1",
"data": {
"sku": "SKU-1",
"description": "Lithium battery pack 12V",
"version": 1
}
}
Product description changed, on the analytics stream.
type = com.warehouse.wms.product-master.product.ProductDescriptionChanged (the same as on the integration topic); dataschema urn:warehouse:product-master:analytics:ProductDescriptionChanged:v1; payload equal to the integration payload.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "8d3f2c1a-6b5e-4f7a-9c0d-1e2f3a4b5c6d",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductDescriptionChanged",
"subject": "SKU-1",
"time": "2026-10-06T21:01:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:analytics:ProductDescriptionChanged:v1",
"data": {
"sku": "SKU-1",
"description": "Lithium battery pack 12V, 7Ah",
"version": 2
}
}
Product classified, on the analytics stream.
type = com.warehouse.wms.product-master.product.ProductClassified (the same as on the integration topic); dataschema urn:warehouse:product-master:analytics:ProductClassified:v1; payload equal to the integration payload.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "0f6d8a2b-3c4e-4d5f-8a9b-7c6d5e4f3a2b",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductClassified",
"subject": "SKU-1",
"time": "2026-10-06T21:02:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:analytics:ProductClassified:v1",
"data": {
"sku": "SKU-1",
"handling_tags": [
"Hazmat",
"TemperatureSensitive"
],
"temperature_class": "Frozen",
"dot_hazard_class": 3,
"classification_source": "native",
"version": 3
}
}
Product dimensions declared, on the analytics stream.
type = com.warehouse.wms.product-master.product.ProductDimensionsDeclared (the same as on the integration topic); dataschema urn:warehouse:product-master:analytics:ProductDimensionsDeclared:v1; payload equal to the integration payload.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "5a4b3c2d-1e0f-4a9b-8c7d-6e5f4a3b2c1d",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductDimensionsDeclared",
"subject": "SKU-1",
"time": "2026-10-06T21:03:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:analytics:ProductDimensionsDeclared:v1",
"data": {
"sku": "SKU-1",
"declared": {
"length_mm": 200,
"width_mm": 120,
"height_mm": 80,
"weight_g": 1500,
"volume_mm3": 1920000
},
"effective": {
"length_mm": 200,
"width_mm": 120,
"height_mm": 80,
"weight_g": 1500,
"volume_mm3": 1920000
},
"effective_source": "declared",
"discrepancy": false,
"version": 4
}
}
Product measured, on the analytics stream.
type = com.warehouse.wms.product-master.product.ProductMeasured (the same as on the integration topic); dataschema urn:warehouse:product-master:analytics:ProductMeasured:v1; payload equal to the integration payload.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductMeasured",
"subject": "SKU-1",
"time": "2026-10-06T21:04:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:analytics:ProductMeasured:v1",
"data": {
"sku": "SKU-1",
"declared": {
"length_mm": 200,
"width_mm": 120,
"height_mm": 80,
"weight_g": 1500,
"volume_mm3": 1920000
},
"measured": {
"length_mm": 205,
"width_mm": 121,
"height_mm": 82,
"weight_g": 1720,
"volume_mm3": 2034010,
"measured_at": "2026-10-06T14:05:00Z",
"device_id": "CUBISCAN-03"
},
"effective": {
"length_mm": 205,
"width_mm": 121,
"height_mm": 82,
"weight_g": 1720,
"volume_mm3": 2034010
},
"effective_source": "measured",
"discrepancy": true,
"version": 5
}
}
A SKU was registered as a product.
type = com.warehouse.wms.product-master.product.ProductRegistered; subject and key = the SKU.
A registered product's description changed.
type = com.warehouse.wms.product-master.product.ProductDescriptionChanged; subject and key = the SKU.
A product's handling classification was set or replaced.
type = com.warehouse.wms.product-master.product.ProductClassified;
subject and key = the SKU. Full-state replacement of the
classification. sku, handling_tags, temperature_class and
dot_hazard_class keep the field names of inventory-storage's v1
payload (ADR 0004). Optional fields are omitted when unset.
Declared unit dimensions and weight were set or replaced.
type = com.warehouse.wms.product-master.product.ProductDimensionsDeclared;
subject and key = the SKU. Carries the FULL physical profile after the
change (ADR 0002); act on effective.
A measurement of one unit was recorded and is now effective.
type = com.warehouse.wms.product-master.product.ProductMeasured;
subject and key = the SKU. Carries the FULL physical profile after the
change (ADR 0002); act on effective.
A pack level (EACH, INNER, CASE or PALLET) of a SKU was declared, or one of its mutable attributes changed.
type = com.warehouse.wms.product-master.product.ProductPackLevelDeclared;
subject and key = the SKU. Carries the FULL level after the change
(ADR 0011). child_gtin and qty_of_child are absent for EACH;
units_per_pack is 1 for EACH. dims are the DECLARED dimensions
(omitted when none); measurements arrive as ProductPackLevelMeasured.
Only dims, is_orderable and is_despatch_unit can change for a
GTIN already announced (the event is then re-sent in full); a new
content quantity is a new gtin.
A pack level was end-dated; its GTIN stays resolvable.
type = com.warehouse.wms.product-master.product.ProductPackLevelRetired;
subject and key = the SKU. reason is superseded when a new GTIN was
declared at the same level (the matching ProductPackLevelDeclared
follows with the next version), else the reason given to the retire
command. The GTIN is never reused. The levels above it are NOT retired
by this event: re-declare them.
A measurement of one pack of an active level was recorded.
type = com.warehouse.wms.product-master.product.ProductPackLevelMeasured;
subject and key = the SKU. The measurement of the declared-versus-measured
split (ADR 0002) per level; device_id is omitted for a manual one.
Product registered, on the analytics stream.
type = com.warehouse.wms.product-master.product.ProductRegistered (the same as on the integration topic); dataschema urn:warehouse:product-master:analytics:ProductRegistered:v1; payload equal to the integration payload.
Product description changed, on the analytics stream.
type = com.warehouse.wms.product-master.product.ProductDescriptionChanged (the same as on the integration topic); dataschema urn:warehouse:product-master:analytics:ProductDescriptionChanged:v1; payload equal to the integration payload.
Product classified, on the analytics stream.
type = com.warehouse.wms.product-master.product.ProductClassified (the same as on the integration topic); dataschema urn:warehouse:product-master:analytics:ProductClassified:v1; payload equal to the integration payload.
Product dimensions declared, on the analytics stream.
type = com.warehouse.wms.product-master.product.ProductDimensionsDeclared (the same as on the integration topic); dataschema urn:warehouse:product-master:analytics:ProductDimensionsDeclared:v1; payload equal to the integration payload.
Product measured, on the analytics stream.
type = com.warehouse.wms.product-master.product.ProductMeasured (the same as on the integration topic); dataschema urn:warehouse:product-master:analytics:ProductMeasured:v1; payload equal to the integration payload.
A GTIN, always the 14-digit zero-left-padded string with a valid mod-10 check digit.