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
TODO error case in broker recieve #155
Comments
Oh and I forgot to say: thanks for open sourcing this lib - it seems generally solid and well thought out! |
Ya, in practice it ended up being handled up the stack. If anything causes an error in The broker error-handling API is one of my sore points and something I wish I could revisit somehow without totally rewriting everything... oh well :) The current producer design is somewhat problematic. I have a new design that should be much better, but since I wrote it I have been unable to find the time to tidy it up, test it and merge it: #132. I will try again to find some time for this, but you may find it useful if you're running into limitations with the current producer. No guarantees etc. but it should work in all the same cases the current one does. |
Of course, if you try the new design and you do have any questions or issues with it please let us know, it will give us a better idea of what's left to do on it before it's fully ready to merge. |
Thanks Evan I will take a look at the new producer when I get a chance.
|
Closing this as I think I managed to answer the primary question. |
Hi sorry this is a lame issue but reading code I came accross:
https://github.com/Shopify/sarama/blob/master/broker.go#L392-L395
Seems like quite a major point to be left as a TODO? In fact I think the same applies to any of the 3 places in that loop that return error and continue - they left socket with partial message read so surely all subsequent reads will also fail until you kill the connection.
Perhaps in practice something higher up the stack does that but it seems like a pretty critical issue that must come up in practice.
I notice there was some discussion of the general error handling around broker connections in a few issues.
I guess maybe this is not a big deal since most people are only using the QueueMessage interface?
I'm currently trying to figure out how to implement a Kafka producing daemon that has some pretty specific requirements around error handling that Sarama doesn't yet support, but my two cents on this are that you certainly should fail harder and close connection in those cases.
The text was updated successfully, but these errors were encountered: