@@ -36,6 +36,7 @@ The configuration parameters are:
3636- The app's callback url
3737- The version number of the API
3838- The app's environment (the BB2.0 web location where the app is registered)
39+ - The FHIR call retry settings
3940
4041| Parameter | Value | Comments |
4142| ------------ | ----------------------- | ------------------------------- |
@@ -48,6 +49,23 @@ The configuration parameters are:
4849For application registration and client id and client secret, please refer to:
4950[ Blue Button 2.0 API Docs - Try the API] ( https://bluebutton.cms.gov/developers/#try-the-api )
5051
52+ FHIR requests retry:
53+
54+ Retry is enabled by default for FHIR requests, retry_settings: parameters for exponential back off retry algorithm
55+
56+ | retry parameter | value (default) | Comments |
57+ | ----------------- | -------------------- | -------------------------------- |
58+ | backoff_factor | 5 | back off factor in seconds |
59+ | total | 3 | max retries |
60+ | status_forcelist | [ 500, 502, 503, 504] | error response codes to retry on |
61+
62+ the exponential back off factor (in seconds) is used to calculate interval between retries by below formular, where i starts from 0:
63+
64+ backoff factor * (2 ** (i - 1))
65+
66+ e.g. for backoff_factor is 5 seconds, it will generate wait intervals: 2.5, 5, 10, ...
67+
68+ to disable the retry: set total = 0
5169
5270There are three ways to configure the SDK when instantiating a ` BlueButton ` class instance:
5371
@@ -62,6 +80,11 @@ There are three ways to configure the SDK when instantiating a `BlueButton` clas
6280 " client_secret" : " bar" ,
6381 " callback_url" : " https://www.fake.com/callback" ,
6482 " version" : 2 ,
83+ " retry_settings" : {
84+ " total" : 3 ,
85+ " backoff_factor" : 5 ,
86+ " status_forcelist" : [500 , 502 , 503 , 504 ]
87+ }
6588 }
6689 ```
6790 * JSON config file :
@@ -79,7 +102,12 @@ There are three ways to configure the SDK when instantiating a `BlueButton` clas
79102 " client_id" : " foo" ,
80103 " client_secret" : " bar" ,
81104 " callback_url" : " https://www.fake.com/callback" ,
82- " version" : 2
105+ " version" : 2 ,
106+ " retry_settings" : {
107+ " total" : 3 ,
108+ " backoff_factor" : 5 ,
109+ " status_forcelist" : [500 , 502 , 503 , 504 ]
110+ }
83111 }
84112 ```
85113
0 commit comments