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

Randomize order of seed brokers #632

Merged
merged 1 commit into from
Jan 14, 2020
Merged

Randomize order of seed brokers #632

merged 1 commit into from
Jan 14, 2020

Conversation

Nevon
Copy link
Collaborator

@Nevon Nevon commented Jan 14, 2020

Allows spreading the initial connection load towards the brokers by shuffling the the order of the seed brokers. They are still iterated through in the same way when a connection fails, just not necessarily in the same order they were originally specified.

Fixes #631

FYI @fjuan

Allows spreading the initial connection load towards the brokers, we
shuffle the order of the seed brokers. They are still iterated through
in the same way when a connection fails, just not necessarily in the
same order they were originally specified.

Fixes #631
const { host, port } = builder.build()
return `${host}:${port}`
})
expect(connections).toIncludeSameMembers(brokers)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This validates that all of the brokers are returned, just not in the same order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Randomize brokers to connect to from the connection seed
2 participants