Skip to content
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

[BUG] Reconnection logic and Backoff policy doesn't work correctly #1187

Open
RobertIndie opened this issue Feb 28, 2024 · 2 comments · May be fixed by #1197
Open

[BUG] Reconnection logic and Backoff policy doesn't work correctly #1187

RobertIndie opened this issue Feb 28, 2024 · 2 comments · May be fixed by #1197
Assignees

Comments

@RobertIndie
Copy link
Member

I found that there are some issues with the BackoffPolicy:

  1. We should use a new backoff instance for each use:
    defaultBackoff = internal.DefaultBackoff{}
  2. In the reconnection logic, the checking for IsMaxBackoffReached doesn't respect the pc.options.backoffPolicy.
    if maxRetry == 0 || defaultBackoff.IsMaxBackoffReached() {

    Actually, the IsMaxBackoffReached is incorrect. We should respect the operation timeout and check the whole retired time instead of the backoff delay time.
  3. From the view of API design, we should move the BackoffPolicy out of the internal package.
@crossoverJie
Copy link
Contributor

@RobertIndie Is there any progress on this issue? Maybe I can handle it.

@RobertIndie
Copy link
Member Author

Sure. Thanks. I assigned this to you.

crossoverJie added a commit to crossoverJie/pulsar-client-go that referenced this issue Mar 13, 2024
crossoverJie added a commit to crossoverJie/pulsar-client-go that referenced this issue Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants