Closed silasdavis closed 5 years ago
Just came across Cleaner
, so I guess that can be used to get to the closed state. Would be useful to have some guidance on how and why this is meant to be used.
@silasdavis: Why would you want to close a connection? What should happen to the open queues, consumers and producers in that case?
I agree the cleaner is not properly documented, it's mentioned in the https://github.com/adjust/rmq#todo section though.
Why would you want to close a connection?
I dunno, superstition...? Mostly just because it was part of the public API and I was wondering if Bad Things would happen. Seems not.
I have the cleaner running and run it on startup so I assume that will save me.
What should happen to the open queues, consumers and producers in that case?
Perhaps they shutdown gracefully?
I was more just worried about any resources that might need to be cleaned up. Happy to close if there is no need to call Close
It's part of the public interface because the cleaner uses it. (I know it's the same package so technically it wouldn't have to, but that was the motivation behind exporting it)
But I'm not aware of any use case where you'd have to close a connection. You can safely ignore that function.
Thanks!
I note from: https://github.com/adjust/rmq/issues/40 that
redisConnection
is deliberately not exported, but theConnection
interface does not have theClose()
method. There is therefore no way outside of local declaration scope to close a connection. Should I care?