# Consumer-driven Contracts

A common problem in microservices architectures is the seemingly contradictory goals of loose coupling yet contract fidelity. One innovative approach that utilizes advances in software architecture and development is a consumer-driven contract.

In many architecture integration scenarios, a service decides what information to emit to other integration partners (a push model - the service provider pushes a contract to consumers). The concept of consumer-driven contract inverses that relationship into a pull model; here the consumer puts together a contract for the items they need from the provider, and passes the contract to the provider, who includes it in their build and keeps the contract test green at all times.

Advantages:

* Allow loose contract coupling between services
* Allow variability in strictness
* Evolvable

Disadvantages:

* Require engineering maturity
* Two interlocking mechanisms than one


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notebook.iuriioapps.com/architecture-and-design/consumer-driven-contracts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
