Integration with other Spring Cloud projects

You have probably noticed that the sample system mixes different styles of inter-service communication. There are some microservices that use typical RESTful HTTP API, and some others that use the message broker. There are also no objections to mixing different styles of communication inside a single application. You may, for example, include spring-cloud-starter-feign to the project with Spring Cloud Stream, and enable it with the @EnableFeignClients annotation. In our sample system, those two different styles of communication combine account-service, which integrates with order-service via the message broker, and with product-service through the REST API. Here's the Feign client's product-service ...

Get Mastering Spring Cloud 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.