-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FFM-12087 New configuration options + close related bug fixes #203
Conversation
…source (streaming) code
FFM-12087 Add maxRequestConfig FFM-12087 Add maxRequestConfig FFM-12087 Add maxRequestConfig
FFM-12087 Apply timeout to metrics flush request
c049617
to
1eb01e5
Compare
7ad15be
to
ae447a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heck of a PR, i think it looks good my only concern would be, do we want to have a single retry value for all these scenarios.
@@ -48,7 +60,7 @@ public static void main(String[] args) { | |||
TimeUnit.SECONDS); | |||
|
|||
// SDK will exit after 15 minutes, this gives the example time to stream events |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe worth updating the comment in line?
Thanks! Addressed your concern on slack but will put it here as well: If streaming is enabled, then 99.9 percent of cases it should try to reconnect forever with exponential back off. I've only ever encountered one edge case in 2 years where a customer wants to limit stream retries for a client session, and that was on the browser (JS SDK) so we added a stream retry config there |
FFM-12087 Bump version
ae447a2
to
71bee73
Compare
92d3f80
to
017b74c
Compare
017b74c
to
ffb0065
Compare
a09f56a
to
183dce2
Compare
183dce2
to
eac0984
Compare
What
This PR adds two new features, and fixes some bugs around closing the SDK.
New Features
Retries
Adds new
maxRequestRetry
option, defaulting to10
, which controls the number of retries made for requests toauth
/polling
/metrics
/fetch flag
andfetch group
requestsChanges the stream reconnect limit from
5
attempts to no limit. This was a bug, and to align with our SDKs the stream should always attempt to reconnect (on retryable errors)Exponential backoff capped at 1 minute max delay.
Flush metrics when SDK is closed
flushAnalyticsOnClose
, defaulting todisabled
, which will post analytics when the SDK is closed. The default timeout for this request is30000ms
, before which the SDK will not be fully closed and network resources used by the request will remain open.flushAnalyticsOnCloseTimeout
, defaulting to30000ms
, which can help if the user prefers a shorter or longer timeout before all SDK resources are closed.Bug fixes
.executorService().shutdown();
Testing
Issues
#201
#202