product-master Domain Events 1.1.0

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.

  • #product-master
  • #product
  • #analytics

Servers

  • {brokers}kafkaproduction

    Fleet-shared Kafka broker (host supplied by the deployment environment).

    object
    string
    required
    Security:
    security.protocol:PLAINTEXT

Operations

  • SUB warehouse.product-master.events

    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>).

    Operation IDreceiveProductEvents

    Available only on servers:

    • #product

    Accepts one of the following messages:

    • #0Product registered

      A SKU was registered as a product.

      type = com.warehouse.wms.product-master.product.ProductRegistered; subject and key = the SKU.

      allOf
      • #product

      Examples

    • #1Product description changed

      A registered product's description changed.

      type = com.warehouse.wms.product-master.product.ProductDescriptionChanged; subject and key = the SKU.

      allOf
      • #product

      Examples

    • #2Product classified

      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.

      allOf
      • #product

      Examples

    • #3Product dimensions declared

      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.

      allOf
      • #product

      Examples

    • #4Product measured

      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.

      allOf
      • #product

      Examples

    • #5Product pack level declared

      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.

      allOf
      • #product

      Examples

    • #6Product pack level retired

      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.

      allOf
      • #product

      Examples

    • #7Product pack level measured

      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.

      allOf
      • #product

      Examples

  • SUB warehouse.product-master.analytics

    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.

    Operation IDreceiveProductAnalyticsEvents

    Available only on servers:

    • #analytics

    Accepts one of the following messages:

    • #0Product registered (analytics)

      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.

      allOf
      • #analytics

      Examples

    • #1Product description changed (analytics)

      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.

      allOf
      • #analytics

      Examples

    • #2Product classified (analytics)

      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.

      allOf
      • #analytics

      Examples

    • #3Product dimensions declared (analytics)

      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.

      allOf
      • #analytics

      Examples

    • #4Product measured (analytics)

      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.

      allOf
      • #analytics

      Examples

Messages

  • #1Product registered

    A SKU was registered as a product.

    Message IDProductRegistered

    type = com.warehouse.wms.product-master.product.ProductRegistered; subject and key = the SKU.

    allOf
    • #product
  • #2Product description changed

    A registered product's description changed.

    Message IDProductDescriptionChanged

    type = com.warehouse.wms.product-master.product.ProductDescriptionChanged; subject and key = the SKU.

    allOf
    • #product
  • #3Product classified

    A product's handling classification was set or replaced.

    Message IDProductClassified

    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.

    allOf
    • #product
  • #4Product dimensions declared

    Declared unit dimensions and weight were set or replaced.

    Message IDProductDimensionsDeclared

    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.

    allOf
    • #product
  • #5Product measured

    A measurement of one unit was recorded and is now effective.

    Message IDProductMeasured

    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.

    allOf
    • #product
  • #6Product pack level declared

    A pack level (EACH, INNER, CASE or PALLET) of a SKU was declared, or one of its mutable attributes changed.

    Message IDProductPackLevelDeclared

    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.

    allOf
    • #product
  • #7Product pack level retired

    A pack level was end-dated; its GTIN stays resolvable.

    Message IDProductPackLevelRetired

    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.

    allOf
    • #product
  • #8Product pack level measured

    A measurement of one pack of an active level was recorded.

    Message IDProductPackLevelMeasured

    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.

    allOf
    • #product
  • #9Product registered (analytics)

    Product registered, on the analytics stream.

    Message IDProductRegisteredAnalytics

    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.

    allOf
    • #analytics
  • #10Product description changed (analytics)

    Product description changed, on the analytics stream.

    Message IDProductDescriptionChangedAnalytics

    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.

    allOf
    • #analytics
  • #11Product classified (analytics)

    Product classified, on the analytics stream.

    Message IDProductClassifiedAnalytics

    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.

    allOf
    • #analytics
  • #12Product dimensions declared (analytics)

    Product dimensions declared, on the analytics stream.

    Message IDProductDimensionsDeclaredAnalytics

    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.

    allOf
    • #analytics
  • #13Product measured (analytics)

    Product measured, on the analytics stream.

    Message IDProductMeasuredAnalytics

    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.

    allOf
    • #analytics

Schemas

  • object
  • string
  • object
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • string
  • string

    A GTIN, always the 14-digit zero-left-padded string with a valid mod-10 check digit.

  • object
  • allOf
  • allOf
  • allOf