Skip to main content

Context Map

Following ddd-crew Context Mapping. This is offer-availability's slice of the network map: every relationship this context has, with the upstream (U) and downstream (D) side, the pattern and the channel. Patterns: OHS = Open Host Service, CF = Conformist, C/S = Customer/Supplier. The fleet-wide map is the aggregator's Context Map.

Source: internal/adapters/inbound/kafka/node_consumer.go, seller_consumer.go and received_consumer.go (consumed side), internal/adapters/outbound/kafka/encoder.go and apis/asyncapi.yaml (published side), apis/openapi.yaml (REST), cmd/mcp, cmd/a2a; the downstream consumers were read on 2026-11-13 from each sibling's inbound Kafka handlers at origin/develop, the other neighbour relationships are the aggregator's context map, not code in this repository.

Legend: thick arrows are Kafka events and point from the publisher to the consumer; the thin arrow is a REST call and points from the caller to the service; dotted arrows are read-only queries into this context; the dotted line without an arrow head is a deliberately absent relationship. Classifications follow the aggregator's Subdomain Classification. The vendor-connectivity REST edge is drawn from the caller, but this context is the upstream Supplier of that call.

Omitted: Postgres and Kafka as infrastructure, and the contexts with no relationship to this one (Separate Ways): customer-ordering, linehaul-transportation, last-mile-delivery.

Edge table​

NeighbourDirectionPatternChannelMessagesBuilt here?
node-topology (Supporting)Upstream; this context is downstreamConformistKafka retailnetwork.node-topology.events, com.retailnetwork.logistics.node-topology.node.<Event>NodeRegistered, NodeActivated, NodeSuspended, NodeRetiredConsumer side yes (internal/adapters/inbound/kafka/node_consumer.go)
vendor-connectivity (Supporting)This context upstream (Supplier); VC downstream (Customer)Customer/SupplierREST POST /inventory-feeds, GET /inventory-feeds/{feedId}ApplyInventoryFeedServer side yes; the caller is not in this repository
vendor-connectivityThis context upstream; VC downstreamConformistKafka retailnetwork.offer-availability.eventsListingCreated, CatalogItemPackagingDeclared, CatalogItemPackLevelRetiredPublisher side yes; no consumer code here
delivery-promise (Core)This context upstreamConformistKafka (same topic)CatalogItemCreated, CatalogItemDiscontinued, ListingCreated, ListingAvailabilityChanged, ListingSuppressed, ListingRestoredPublisher side only
order-sourcing (Core)This context upstreamConformistKafka (same topic)CatalogItemDiscontinued, ListingCreated, ListingAvailabilityChanged, ListingSuppressed, ListingRestoredPublisher side only
shipping-and-tracking (Generic)This context upstreamConformistKafka (same topic)CatalogItemCreatedPublisher side only
node-performance (Supporting)This context upstreamConformistKafka (same topic)InventoryFeedAppliedPublisher side only
seller-inbound (Supporting)This context upstreamConformistKafka (same topic)CatalogItemPackagingDeclared, CatalogItemPackLevelRetired, ListingAvailabilityChangedPublisher side only
seller-inboundUpstream; this context is downstreamConformistKafka retailnetwork.seller-inbound.events, com.retailnetwork.partner.seller-inbound.<entity>.<Event>SellerSuspended, SellerReinstated, InboundShipmentReceivedConsumer side yes (internal/adapters/inbound/kafka/seller_consumer.go, received_consumer.go)
pricing (Core)This context upstreamConformistKafka (same topic)CatalogItemCreated, CatalogItemDiscontinuedPublisher side only
product-content (Generic)This context upstreamConformistKafka (same topic)CatalogItemCreated, CatalogItemDiscontinuedPublisher side only
product-discovery (Supporting)This context upstreamConformistKafka (same topic)CatalogItemCreated, CatalogItemDiscontinued, ListingCreated, ListingAvailabilityChanged, ListingSuppressed, ListingRestoredPublisher side only
shopping-cart (Supporting)This context upstreamConformistKafka (same topic)CatalogItemCreated, CatalogItemDiscontinuedPublisher side only
Network merchandising (human)This context upstreamUIREST POST /catalog-items, POST /catalog-items/{catalogItemId}/discontinuations, packaging routes, POST /listingsCreateCatalogItem, DiscontinueItem, DeclarePackLevel, RetirePackLevel, CreateListingYes
StorefrontThis context upstreamOpen Host ServiceREST GET /catalog, GET /catalog/{catalogItemId}, GET /listingsBrowseCatalog, GetCatalogItem, ListListingsYes
AgentsThis context upstreamOpen Host ServiceMCP cmd/mcp (four read-only tools), A2A cmd/a2a (skills check_availability, feed_outcome)the read use casesYes
network-fulfillment (fleet, other organisation)noneSeparate WaysnonenoneNot applicable

The downstream consumer lists were recomputed on 2026-11-13 from each sibling's inbound Kafka handlers at origin/develop; this repository publishes the events, holds no consumer of its own events and no contract test against a consumer (Integration). The type-by-consumer table is on Domain events.

Notes on the patterns​

  • Conformist downstream, no Published Language claimed. Every consumer of this context's events takes them as published. The CloudEvents envelope and dataschema URNs are the fleet convention (internal/adapters/kafka/cloudevents), but the topic is not declared a Published Language, so this page does not either.
  • Customer/Supplier with vendor-connectivity. The POST /inventory-feeds contract is in-organization and synchronous; both sides can shape it, vendor-connectivity is the Customer. This service does not authenticate the caller (REST is unauthenticated fleet-wide).
  • No Anti-Corruption Layer here. The vendor's vocabulary is translated in vendor-connectivity; by the time a feed arrives it speaks listingId, availableQty and basis.
  • No Shared Kernel. nodeId, catalogItemId and listingId cross boundaries by value only; the domain packages import nothing from a neighbour (the node status is restated in internal/domain/nodestatus).
  • No sibling calls. The service has no outbound REST, MCP or A2A client.

Packaging and seller-inbound​

The packaging hierarchy and the optional listing ownerRef came with ADR 0006 (the realisation of the aggregator's ADR 0009). They add the seller-inbound edge and the pack-level events to the vendor-connectivity edge in the table above. The reverse edge, seller-inbound upstream with SellerSuspended, SellerReinstated and InboundShipmentReceived, came with ADR 0013 and ADR 0014.