Consumer Driven Contracts and Your Microservice Architecture

Video of my talk Consumer Driven Contracts and Your Microservice Architecture co-delivered with my friend Marcin Grzejszczak at Spring One Platform 2017


Consumer driven contracts (CDC) are like TDD applied to the API. It’s especially important in the world of microservices. Since it’s driven by consumers, it’s much more user friendly. Of course microservices are really cool, but most people do not take into consideration plenty of potential obstacles that should be tackled. Then instead of frequent, fully automated deploys via a delivery pipeline, you might end up in an asylum due to frequent mental breakdowns caused by production disasters.

We will write a system using the CDC approach together with Spring Boot, Spring Cloud Contract verifier. We’ll show you how easy it is to write applications that have a consumer driven API and that will allow a developer to speed up the time of writing his better quality software.

Consumer Driven Contracts with Spring Cloud Contract

Jan 26 2017 Talk @ Toronto Java User Group

A video of my talk Consumer Driven Contracts with Spring Cloud Contract on Jan 26 2017 at the Toronto Java User Group.


Changing a published API over time is hard due to backward compatibility concerns. This is even more of an issue in a microservice architecture with 100’s of microservices that each publish and API. Consumer Driven Contracts is an effective service evolution pattern. In this talk we will explain the ideas behind Consumer Driven Contracts and show how to implement them easily with Spring Cloud Contract.

Spring Cloud Contract is an umbrella project holding solutions that help users in successfully implementing the Consumer Driven Contracts approach. Currently Spring Cloud Contract consists of the Spring Cloud Contract Verifier project.

Spring Cloud Contract Verifier is a tool that enables Consumer Driven Contract (CDC) development of JVM-based applications. It is shipped with Contract Definition Language (DSL) written in Groovy. Stating with version 1.1.0 you can define your own way of defining contracts – the only thing you have to provide is a converter. Contract definitions are used to produce following resources:

  • JSON stub definitions to be used by WireMock (HTTP Server Stub) when doing integration testing on the client code (client tests). Test code must still be written by hand, test data is produced by Spring Cloud Contract Verifier. Starting with version 1.1.0 you can provide your own implementation of the HTTP Server Stub.
  • Messaging routes if you’re using one. We’re integrating with Spring Integration, Spring Cloud Stream and Apache Camel. You can however set your own integrations if you want to.
  • Messaging routes if you’re using one. We’re integrating with Spring Integration, Spring Cloud Stream and Apache Camel. You can however set your own integrations if you want to.

Spring Boot Microservices

July 31 2014 Talk @ Toronto Java Users Group

Video of my talk Spring Boot Microservices on July 31 2014 at the Toronto Java Users Group.


According to Martin Fowler “The term “Microservice Architecture” has sprung up over the last few years to describe a particular way of designing software applications as suites of independently deployable services. While there is no precise definition of this architectural style, there are certain common characteristics around organization around business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data.”

The presentation is going to explore the micro services architecture and how to implement micro services with spring boot. The presentation consists of a few slides and lot of live coding with Spring Boot. No previous Spring experience required to follow along the live coding

Java 8 Lambda Expressions & Streams

April 9 2014 Talk @ San Francisco Java Users Group

Video of my talk Java 8 Lambda Expressions & Streams on April 9 2014 at the San Francisco Java User Group.


Java 8 ships with loads of new features. This in-depth presentation will get you quickly up to speed with Java 8 Lambda Expressions and the new streams API. Through a series of numerous short examples we will cover what you need to know to get going with Java 8 lambdas and streams.