Connection stuck if first broker on the list is down
See original GitHub issueIssue:
let config = { brokers: ['broker1:9092', 'broker2:9092', 'broker3:9092'] }
assuming broker1:9092
is down, kafkajs will fail to connect to the cluster. But if the order
is :
let config = { brokers: ['broker2:9092', 'broker1:9092', 'broker3:9092'] }
or
let config = { brokers: ['broker3:9092', 'broker2:9092', 'broker1:9092'] }
The connection will work fine.
I’d expect kafkajs to be able to connect to the cluster in case one broker is down, and that broker is the first on the list, WDYT?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Why Can't I Connect to Kafka? | Troubleshoot Connectivity
The initial connection to a broker (the bootstrap). This returns metadata to the client, including a list of all the brokers in the...
Read more >Troubleshoot SQL Server Service Broker issues - Operations ...
Describes common troubleshooting steps for SQL Server Service Broker-related issues in System Center Operations Manager.
Read more >Spring Container hangs if ActiveMQ is not started
The createSession call is triggering the client to try and send its connection information request to the Broker but that can't happen until...
Read more >Broker Hangs after some time - or does nothing.-Apache Mail ... - Re
So, first off, the "Connection reset" error means a client is losing > connection to the broker without cleaning up first - not...
Read more >Troubleshooting connectivity issues between the agent, client ...
While deploying a pool, virtual machines are stuck with a status of Customizing on the Virtual Machines tab. · Connection to the virtual...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Update: it seems that it does manage to connect https://github.com/tulios/kafkajs/blob/master/src/broker/index.js#L79 but it get stuck on this call https://github.com/tulios/kafkajs/blob/master/src/broker/index.js#L82 which is related to the issue I currently have with this broker, so perhaps adding a timeout to this call will make the client more robust to this edge case
Fixed by #369