vert-x3 / vertx-zookeeper

Zookeeper based cluster manager implementation
Other
73 stars 67 forks source link

add a way to configure the retry policy using json file. #143

Closed vmorsiani closed 1 year ago

vmorsiani commented 1 year ago

Motivation:

Right now the RetryPolicy is hardcoded (ExponentialBackoffRetryPolicy) and the only way to override this is buy providing directly a CuratorFramework instance when creating a ZookeeperClusterManager.

It is a bit overkill to do so when someone simply want to change the retry policy (for something like retry forever for retry elapsed or retry forever for example).

This pull request provide a simple mechanism to enable a user to provide a "policy" setting within the retry configuration, which will then be used in the ZookeeperClusterManager

Conformance:

Your commits should be signed and you should have signed the Eclipse Contributor Agreement as explained in https://github.com/eclipse/vert.x/blob/master/CONTRIBUTING.md Please also make sure you adhere to the code style guidelines: https://github.com/vert-x3/wiki/wiki/Vert.x-code-style-guidelines

vmorsiani commented 1 year ago

@tsegismont I added the unit tests and updated the documentation accordingly.

Tests are working on my local environment but as for my previous contribution, it fails on CI (seems pretty random)

vmorsiani commented 1 year ago

Thank you @vmorsiani , just a couple of documentation changes required

Thanks for the feedback @tsegismont I integrated your documentation changes so I believe it should be all good now.