Configurable Retry And Timeout for Entitlements Service
All Submissions:
- I have added an explanation of what changes in this merge do and why we should include it? - YES
- Does the MR contain pipeline/ helm chart related changes?- NO
- I have updated the documentation accordingly. - YES
- I have added tests to cover my changes. -NA
- All new and existing tests passed. -YES
- My code follows the code style of this project. -YES
- I ran lint checks locally prior to submission. -YES
What is the issue or story related to the change?
This change is a step forward to enable the services to configure following variables for service-to-service communication:
- Retry count for service unavailable strategy
- Connect timeout
- Connection Request Timeout
- Socket Timeout
These configurations can only be used for entitlements service for now.
High level design: This MR adds 5 classes in total.
- RetryAndTimeoutConfiguration : contains configuration variables
- HttpClientHandlerAzure : extends HttpClientHandler, and sets variables as picked up by RetryAndTimeoutConfiguration
- HttpClientAzure : uses UrlFetchServiceImpl(which in turn use IHttpClientHandler type) internally, and implements IHttpClient. Currently, Services require a type of IHttpClient to make service-to-service calls
- EntitlementsAPIConfigAzure : creates a bean of type EntitlementsAPIConfig
- EntitlementsFactoryAzure : uses newly created HttpClientAzure internally so that configurable retires can be used for Entitlements Service.
Does this introduce a breaking change?
- NO
Pending items
Following MRs will be brought further :
- Addition of Factory classes of other services on lines of EntitlementsFactoryAzure will be added.
Edited by Muskan Srivastava