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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.