Microservices with Spring Boot 3 and Spring Cloud - Third Edition by Magnus Larsson

Microservices with Spring Boot 3 and Spring Cloud - Third Edition by Magnus Larsson

Author:Magnus Larsson
Language: eng
Format: epub
Publisher: Packt
Published: 2023-10-15T00:00:00+00:00


The composite product API will simply pass on the parameters to the product API. The following query parameters have been added to the two APIs:

delay: Causes the getProduct API on the product microservice to delay its response. The parameter is specified in seconds. For example, if the parameter is set to 3, it will cause a delay of three seconds before the response is returned.

faultPercentage: Causes the getProduct API on the product microservice to throw an exception randomly with the probability specified by the query parameter, from 0 to 100%. For example, if the parameter is set to 25, it will cause every fourth call to the API, on average, to fail with an exception. It will return an HTTP error 500 (Internal Server Error) in these cases.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.