Implementing Hystrix's fallback method

There are five steps to implement fallback methods. For this purpose, we'll create another service, api-service, the way we have created other services. api-service would consume the other services, such as restaurant-service and so on, and would be configured in the Edge server to expose OTRS APIs for external use.

Eureka clients can be implemented using the following three steps. Here, the implementation is written for a restaurant service. The same approach could be used to make another service a Eureka client. Please refer to the download code if you face any issues:

  1. Maven dependency: First, we need to add the following dependency in pom.xml, along with other dependencies for the API service or ...

Get Mastering Microservices with Java - Third Edition now with O’Reilly online learning.

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