-
Notifications
You must be signed in to change notification settings - Fork 628
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
Error handling on connection #117
Comments
Hi, do you get the same problem? For producer, every thing should be done after it get a |
Fair point, but it still just hangs if I add the
|
Yeah, even I explicitly set a timeout option for zk, it still doesn't emit any event |
I've found that kafka-node works with zookeeper via https://github.com/alexguan/node-zookeeper-client/blob/master/lib/ConnectionManager.js#L269 I assume it may be a serious design problem. IMO it should at least notify about those errors. |
bump. I'm able to connect to a local Kafka instance via shell but the library will not. I'd love to debug but I don't get any notifications if ZK connect fails. |
bump! the on error event should be triggered or a new event added when connection fails. Issue needs to be resolved in the Connection Manager: |
+1 |
2 similar comments
+1 |
+1 |
Fix was proposed long long time ago and no changes since then: alexguan/node-zookeeper-client#16 |
+1 |
2 similar comments
+1 |
+1 |
+1 |
3 similar comments
+1 |
+1 |
+1 |
One way to handle this situation is to open a timeout with On the non error side, once the (original) send completes, the timeout should be cleared with It seems to work well when kafka/zk are up and recovers nicely from a restart. |
@vivekpathak despite it is quite smart way this is still a workaround! +1 for a native support |
+1 |
3 similar comments
+1 |
+1 |
+1 |
lol, 3 years and counting... I hear RabbitMQ is pretty good... |
+1 |
3 similar comments
+1 |
+1 |
+1 |
@AndrewKeig - It's not related to Kafka. It's not even node. This library needs a lot of work still and it has many small gotchas. And at the same time for some reason no other alternative has emerged. |
Workaround is robust even on planetary scale iot data transfer being done through kafka Because its an underlying node library issue to do with one sided socket close, it should be Ok to use workaround (which can be considered to be the right way to do things since node socket close is one sided). |
Hi
I noticed a recent issue #103, which I think attempted to resolve this issue. When kafka is not available, or the host provided to
kafka.client
is wrong, how can I detect this? The error handlers in this example are never hit.. The example below creates a topic; it will not time out, and no error is reported; it simply repeats the process of trying to create a topic. If kafka fails for whatever reason we cannot recover on the application side, the application will never know.The text was updated successfully, but these errors were encountered: