Permit creating client with multiple broker addresses #13
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.
Fixes #7
@burke @fw42
CC @tobi
This does the simplest thing that works. It has some flaws, but most
importantly it gets the API in place and is basically functional. We can
improve it later without breaking API compatibility.
Remaining sub-optimal behaviour:
wait for the first two connections to completely fail (which may take several
minutes depending on the TCP timeout) before we try the third. Trying them
all in parallel and using the first valid one would be better.
long-running cluster, all of the nodes may be down at one point or another,
meaning that eventually we may 'run out' of nodes and abort. We should
probably just mark the address as recently-failed, and retry them after some
time has passed. Only if all nodes have recently failed should we abort.