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 (ADR 0004). The contract is apis/asyncapi.yaml (AsyncAPI 3.0.0); field-level detail is on Domain events. The tables below are the pinned contract and the encoder, not observed traffic.

Envelope​

AttributeValue
specversion1.0
idUUID v4, minted once when the event is appended to the outbox and stored with the row, so a relay retry republishes the same id
source/retailnetwork/vendor-connectivity
typecom.retailnetwork.partner.vendor-connectivity.<entity>.<EventName>; entity vendoraccount, purchaseorder, submission or inboundreceipt
subjectthe aggregate root id (see the table); also the Kafka message key, so one subject's events stay ordered on one partition
timethe domain occurrence time, RFC 3339 UTC
datacontenttypeapplication/json
dataschemaurn:retailnetwork:vendor-connectivity:<events|analytics>:<EventName>:v1

data is camelCase; timestamps are RFC 3339 UTC; optional fields are omitted when absent (never null); arrays are always present. No event carries a ship-to address, name or phone.

Published​

Eleven types, all through the transactional outbox and the always-on relay (at least once). Ten go to retailnetwork.vendor-connectivity.events; PurchaseOrderCancelled goes only to retailnetwork.vendor-connectivity.analytics, which no repository consumes. Source: internal/adapters/outbound/kafka/encoder.go and the events.go of each domain package.

Type (after the common prefix)Subject and keyRaised whendata
vendoraccount.VendorOnboardedvendorIdOnboardVendor creates an accountvendorId, name, ackWindowMinutes
vendoraccount.VendorSuspendedvendorIdSuspendVendorvendorId, suspendedAt, reason?
vendoraccount.VendorReinstatedvendorIdReinstateVendorvendorId, reinstatedAt
purchaseorder.PurchaseOrderIssuedpoNumbera release becomes a purchase orderpoNumber, vendorId, nodeId, assignmentId, releaseNo, requiredShipBy, ackBy, lines[{lineNo, listingId, quantity}]
purchaseorder.PurchaseOrderAcceptedpoNumberan ACCEPT acknowledgement transaction succeededpoNumber, assignmentId, releaseNo, nodeId, acceptedAt, transactionId
purchaseorder.PurchaseOrderRejectedpoNumbera REJECT acknowledgement transaction succeededpoNumber, assignmentId, releaseNo, nodeId, reasonCode, rejectedAt
purchaseorder.PurchaseOrderExpiredpoNumberthe expiry sweeper found an ISSUED order past ackBypoNumber, assignmentId, releaseNo, nodeId, ackBy
purchaseorder.VendorShipmentConfirmedpoNumbera shipment confirmation transaction succeededpoNumber, assignmentId, nodeId, trackingNumbers[], shippedAt, requiredShipBy
purchaseorder.PurchaseOrderCancelled (analytics topic only)poNumberFulfillmentCancelled cancelled an ISSUED orderpoNumber, assignmentId, reason
submission.SubmissionProcessedtransactionIdany asynchronous write reached SUCCESS or FAILUREtransactionId, vendorId, kind, status, errorCount
inboundreceipt.InboundReceiptSubmittedshipmentIdan inbound receipt was accepted (same transaction as the submission)transactionId, vendorId, nodeId, shipmentId, receivedAt, cartons[{sscc, status, items[{gtin, qtyEaches}], complianceCodes[]}]
returnoutcome.VendorReturnOutcomeSubmittedauthorizationIda return outcome was accepted and the advice left the poll (ADR 0014)transactionId, vendorId, authorizationId, nodeId, receivedAt, lines[{catalogItemId, ownerRef?, qtyRestockable, qtyUnsellable}]

Consumers read on the neighbours' origin/develop: order-sourcing (the purchaseorder. types), node-performance (all of them, including InboundReceiptSubmitted), shipping-and-tracking (VendorShipmentConfirmed) and seller-inbound (InboundReceiptSubmitted). The three vendoraccount events have no consumer yet (x-no-consumer-reason in the AsyncAPI). See Integration.

Consumed​

Fourteen types from four producers, each deduplicated on the CloudEvents id in processed_events, dispatched on the full type, decoded tolerantly (unknown fields ignored) and dead-lettered to <topic>.dlq when they cannot be applied. Source: internal/adapters/inbound/kafka/consumers.go and inbound_consumers.go.

Producer and topicTypeFields relied on
node-topology, retailnetwork.node-topology.eventscom.retailnetwork.logistics.node-topology.node.NodeRegisterednodeId, nodeType, subtype, operator, vendorId, vendorNodeCode, regionId, timezone
same...node.NodeOperationalProfileDeclarednodeId, profileRevision, handlingTimeMinutes
same...node.NodeActivated, NodeSuspended, NodeRetirednodeId
offer-availability, retailnetwork.offer-availability.eventscom.retailnetwork.commerce.offer-availability.listing.ListingCreatedlistingId, catalogItemId, nodeId
samecom.retailnetwork.partner.offer-availability.catalogitem.CatalogItemPackagingDeclared and CatalogItemPackLevelRetired (the commerce tier spelling is accepted too)catalogItemId, level, gtin, childGtin, units per pack, timestamps
order-sourcing, retailnetwork.order-sourcing.eventscom.retailnetwork.commerce.order-sourcing.assignment.FulfillmentReleasedToNodeassignmentId, releaseNo, orderId, groupNo, nodeId, requiredShipBy, tier, lines[{listingId, quantity}]
same...assignment.FulfillmentCancelledassignmentId, reason
same...assignment.FulfillmentReleaseWithdrawnassignmentId (the carrier), releaseNo, reason
customer-returns, retailnetwork.customer-returns.eventscom.retailnetwork.commerce.customer-returns.returnauthorization.ReturnAuthorizedauthorizationId, orderId, groupNo, disposition, method, lines[], destinationNodeId?, originNodeId?, authorizedAt, expiresAt
seller-inbound, retailnetwork.seller-inbound.eventscom.retailnetwork.partner.seller-inbound.inboundshipment.InboundShipmentLabelledshipmentId, planId, sellerId, nodeId, cartons[] (SSCC, parent, kind, contents, weight, dimensions), labelledAt
same...inboundshipment.InboundShipmentShippedshipmentId, planId, sellerId, nodeId, shippedAt
same...inboundshipment.InboundShipmentReceivedshipmentId, sellerId, nodeId, status, receivedAt

Failure handling per message is described on Integration and Troubleshooting.