wuYin opened a new pull request #454: URL: https://github.com/apache/pulsar-client-go/pull/454
### Motivation For now, client backoff interval is hardcoded to start from 100s and increasing exponentially to 60s. In some case, client need reconnect to restarted broker as soon as possible, rather than still waiting while broker is available. Like this one, during the 51.2s backoff interval, broker already restarted and available.  ### Modifications - Modular backoff policy and make it configurable, retained mandatory stop policy which added in [pulsar#747](https://github.com/apache/pulsar/pull/747) - Added `backoff_test.go` to test backoff's functionality - Added 2 backoff configurations for Client and use uniformly in producer, consumer reconnection ```go // Set the initial duration of time for a backoff interval (default: 100ms) InitBackoff time.Duration // Set the maximum duration of time for a backoff interval (default: 60s) MaxBackoff time.Duration ``` ### Verifying this change - [ ] Make sure that the change passes the CI checks. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
