Customer-Supplier
One context depends on another and negotiates the interface more collaboratively.
Once a system has bounded contexts, the next question is how they relate. Context mapping patterns describe those relationships: who leads, who follows, where translation happens, and how much protection one model needs from another.
Ordering may depend on payments. Fulfillment may depend on ordering. Support may need read access across many contexts. Without explicit relationship patterns, those dependencies become ad hoc and usually leak language across boundaries.
Context mapping patterns do for inter-context relationships what bounded contexts do for individual models: they make the design visible. Patterns such as Customer-Supplier, Conformist, Shared Kernel, and Anti-Corruption Layer describe how one context should integrate with another and how much of the upstream language it can safely absorb.
This matters because integration shape is part of the domain design, not just an implementation detail.
One context depends on another and negotiates the interface more collaboratively.
A downstream context accepts the upstream model with limited power to change it.
A downstream context protects itself with translation rather than adopting the upstream language directly.
| Relationship | When it appears | Main concern |
|---|---|---|
| Customer-Supplier | Dependent teams can collaborate | Keep the interface sustainable for both sides |
| Conformist | One side has little influence | Avoid pretending the downstream has model independence |
| Anti-Corruption Layer | Upstream language would damage the downstream model | Translate and protect meaning explicitly |
package org.javaomnibus.ecommerce.payments.integration;
public final class OrderingPaymentTranslator {
public PaymentAuthorizationRequest translate(OrderPaymentRequest request) {
return new PaymentAuthorizationRequest(
request.orderId().value(),
request.amount().amount(),
request.amount().currency()
);
}
}