-
Notifications
You must be signed in to change notification settings - Fork 771
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
Writer.close() does not stop the requests for metadata, started by Writer.writeMessages() #803
Comments
This may also be related to #805, let me know if the change helped address your issues. |
@achille-roussel responding to your remark #804 (comment) here: the snippet works. Any connections at the end of my test is now closed. In fact calling What I don't understand though, why the same couldn't be achieved using if w.transport != nil {
w.transport.CloseIdleConnections()
} It turns out though that EDIT: Transport: transport,
transport: transport, That does not happen when |
This is intended actually to retain the historical behavior prior to v0.4 where the writer was managing the connections directly. If you use a |
I see, makes sense. Your suggested workaround works for me, so this issue is no longer a problem for me |
First of all, thank you for writing this great library.
Describe the bug
When calling
writer.Close()
afterwriter.WriteMessages()
, theWriter
keeps causing the periodic making of metadata requests. This happens throughWriter
's underlyingTransport
where the metadata requests originate from thediscover()
entry point. This is problematic in some of the integration tests that I am writing, where I expect no such leaking of resources.Kafka Version
6.0.1
To Reproduce
Expected behavior
When calling
writer.Close()
afterwriter.WriteMessages()
, I expectWriter
to close all connections that it caused. And to stop any requests from happening that it previously caused.The text was updated successfully, but these errors were encountered: