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

Broker list not randomized #1607

Open
gunnartangring opened this issue Aug 16, 2023 · 0 comments
Open

Broker list not randomized #1607

gunnartangring opened this issue Aug 16, 2023 · 0 comments

Comments

@gunnartangring
Copy link

Describe the bug
By design KafkaJS should randomize with of the brokers listed it bootstraps to but in reality this does not happen.

To Reproduce

  1. Unit testing of https://github.com/tulios/kafkajs/blob/master/src/cluster/connectionPoolBuilder.js#L93 with multiple brokers defined

Expected behavior
A random broker will be returned

Observed behavior
The first broker will be returned deterministically

Environment:
(All)

Additional context
A fix was added in v 1.12 randomizing the order of bootstrap brokers, but this fix was later reverted in v 1.13.
#631

gunnartangring added a commit to gunnartangring/kafkajs that referenced this issue Aug 16, 2023
* Randomizing broker order when returned from getBroker
gunnartangring added a commit to gunnartangring/kafkajs that referenced this issue Aug 16, 2023
* Randomizing broker order when returned from getBroker
gunnartangring added a commit to gunnartangring/kafkajs that referenced this issue Aug 16, 2023
* Randomizing broker order
gunnartangring added a commit to gunnartangring/kafkajs that referenced this issue Aug 16, 2023
* Randomizing broker order
gunnartangring added a commit to gunnartangring/kafkajs that referenced this issue Aug 16, 2023
* Randomizing broker order
gunnartangring added a commit to gunnartangring/kafkajs that referenced this issue Aug 16, 2023
* Randomizing broker order
gunnartangring added a commit to gunnartangring/kafkajs that referenced this issue Aug 16, 2023
* Randomizing broker order
gunnartangring added a commit to gunnartangring/kafkajs that referenced this issue Aug 16, 2023
* Randomizing broker order
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

No branches or pull requests

1 participant