-
Notifications
You must be signed in to change notification settings - Fork 195
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
produce_sync raises on timeout #468
Comments
@zmstone sorry to call you, but since you're the main contributor, I'm needing some attention with this. |
Hi @GPrimola , sorry :( it seems to me that kafka did not reply the API version query request. which Kafka version is it ? and which |
@zmstone the issue here is that if the client call times out (instead of failing because client is already dead), Do you think it should return an error tuple for this case or leave it as it is? I don't have a strong opinion on that. I just wrote a working fix, I can submit it, but I'm not sure of the impact (possibility of being a breaking change, etc) |
@zmstone No problem at all! 🙂 Regarding should that be done on |
you can easily handle this exception on your application side, though. |
Exaclty, and that's what I'm doing. However I wonder should I be doing this or should the lib brod handle this better, as it does with |
Lines 840 to 841 in f88130e
I think it's safe and reasonable to capture other exit reasons too for a more consistent behaviour.
BTW, the reported stacktrace does not look like it's from brod |
fixed in: #492 |
Hey guys,
I've been using Kaffe and detected an undesired behaviour.
When brod tries to connect to Kafka but the connections times out, it raises when calling
produce_sync
.I believe a proper behaviour would be to return
{error, timeout}
, like it does with{error, errconection}
.The exception is:
Steps to reproduce
produce_sync ::
{error, errconnection}
closed
):{error, client_down}
.There's no exception raising here, even when brod is trying to connect and you repeatedly try to produce_sync.
produce_sync :: raise
localhost:9092
timeout
):This error happens only when brod is trying to connect to kafka server and you run produce_sync. When the gen_server is sleeping and you run produce_sync, it returns
{error, client_down}
.Expected behaviour
I'd expect that, even though the connection times out, produce_sync should return something like {error, timeout}, and not raise or exit for any reason.
The text was updated successfully, but these errors were encountered: