Consumer-Driven Contracts

There are quite a few patterns, which dictate the communication between dissimilar modules. This becomes especially useful in microservice architecture.

Note

You can learn more about microservices at http://martinfowler.com/articles/microservices.html.

Consumer-Driven Contracts (CDC) is a one of these patterns. It specifies how different modules of the application will interact. The fact that this pattern is called consumer-driven, means that it is the liability of the consumer of the service to dictate what kind of interaction it is expecting and the format this interaction should be in. All the other services (providers) must agree to these contracts and make sure that they are abiding by them.

These contracts from the ...

Get Scala Test-Driven Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.