Increase the backoff strategy time #345
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per conversation with @acogoluegnes we want to have (more or less) the same Stream Java Client behaviour.
The back-off reconnect strategy is increased sensibly. The previous value was too aggressive. It caused a lot of tentative and a lot of server requests. The TCP port can be ready during the restart, but the stream cannot be ready due to the sync.
Introduce a random delay on the strategy to avoid having the same reconnection time in case the client has more producers and consumers.
Introduce also a random delay on the disconnected part on disconnect for the same above reason.
Fixes a bug: check the leader during the reconnection partition.
Introduce the TestBackOff strategy for the tests. The default value is too high for the tests