-
Notifications
You must be signed in to change notification settings - Fork 627
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
kafkaClient.refreshMetadata callback never called #789
Comments
We're using the retry module and |
This is happening once in a while .. i will enable debug logs today, but with the application logs it is verified that the callback is never called .. it is either refreshMetadata callback or send callback. |
@hyperlink : I am getting below logs in debug mode in loop . Any idea ?
|
What version of Kafka are you using? |
We are using kafka 0.10.2.1. And the version of kafka-node we are using is 2.2.3 |
Could you checkout the code, setup docker (description in the README) and create sample code that replicates this issue? |
@hyperlink : Thanks. I will try to do so. Can you please confirm, with the kafka-node 2.2.3 is it a good idea to call refresh metadata before producer.send ? I believe the issue that i talked about arises when:
Can you please help here. I am trying to replicate the situation in the meantime |
the callback queues are cleared when the socket is closed. There maybe a period of time before node notices that the socket is closed (TCP/IP sockets seems forgiving). |
@hyperlink : So i believe i need to figure out a work around to fix this. Thanks for the response. I can understand the need to refresh metadata (broker down, rebalancing, etc) , do i need to explicitly call refresh metadata before every send request ? I can see that in case of 'brokerNotAvailable' refresh metadata is called, but are other cases catered as well (like increase in the number of partitions ?) |
@iamsahil1989 refreshing periodically seems reasonable and would catch the case when the number of partitions has been increased. Calling refresh before every send request seems overkill. |
@hyperlink : Thanks a lot :) |
We are using KafkaClient refreshMetadata/send like below . But some times the callback is not getting called., due to which our consumer remains paused [we are calling async queue callback within] forever.
I can see that there is a return statement inside KafkaClient.refreshMetadata which might have caused this.
if (operation.retry(err)) { return; }
Can you please suggest what could be done in this situation
The text was updated successfully, but these errors were encountered: