kafka-go
kafka-go copied to clipboard
choose random broker to connect
Describe the solution you'd like A clear and concise description of what you want to happen.
here, the code will cause too many clients connect to the first broker ip
Supporting documentation
We can shuffle the brokers before choosing one
Please provides links to relevant Kafka protocol docs and/or KIPs.
You connect to leader, so i don't think that you need to shuffle ip. Or you mean that you connect to ip to get metadata about leader?
The first broker in the list is only used once. If there's an error dialing the leader, the loop moves to the next broker.
Can you show Wireshark/tcpdump traffic that proves only the first is contacted "too many" times?
@vtolstov Can you please provide a PR on how we might allow this?