fix: Potential fix for failing to reconnect to the broker#341
Closed
chriscameron-vertexinc wants to merge 1 commit intofsprojects:developfrom
Closed
fix: Potential fix for failing to reconnect to the broker#341chriscameron-vertexinc wants to merge 1 commit intofsprojects:developfrom
chriscameron-vertexinc wants to merge 1 commit intofsprojects:developfrom
Conversation
Member
I don't think it's a good strategy. I think good strategy would be to make desired change, compile binaries from source code and use it for several weeks on staging environment or even in production and then create a PR. As for the change itself, I don't see how it helps because setting ClientCnx IsActive to false happens at the same time as removing it from the pool: https://github.com/fsprojects/pulsar-client-dotnet/blob/develop/src/Pulsar.Client/Internal/ClientCnx.fs#L203-L204 |
Member
|
Closing as there is no evidence that this change fixes any issues |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
My project has been struggling with intermittent issues where, after losing connection to the broker, the Pulsar client is unable to recover. We have to restart the application to get a good connection to the broker again.
Our best guess is that the DNS for our broker stays the same, but the physical address of the broker changes between deployments. Pulsar.Client may be recycling stale connections for the "old" broker. Unfortunately I've been unable to reproduce the problem in isolation, and our live systems will run for weeks without failure until suddenly we see these problems again.
Our logs are filled with variations of:
And:
This PR is a stab in the dark at trying to remove stale connections in the ConnectionPool.GetConnection method. It simply adds a check to ensure the connection coming out of the pool is active, otherwise it gets removed.