Reconnecting infinitely after Pulsar broker is down
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Motivation
Pulsar keeps trying to reconnect infinitely after reaching maxBackoffInterval without a setting that would allow control over it.
### Solution
Add a configuration setting that would by default retry infinitely, but also makes retry mechanism configurable such that it stops after reaching maxRetryCount (or similar).
Similar issue raised for go library: https://github.com/apache/pulsar-client-go/issues/257
with a fix: https://github.com/apache/pulsar-client-go/pull/360
### Alternatives
_No response_
### Anything else?
_No response_
### Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
Contributor guide
Research direction
Start by locating the Java client’s broker reconnection logic and read the linked Go issue and pull request for the analogous behavior. Done means retrying remains infinite by default while a configurable maximum retry count can stop reconnection after the limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100