AMQPLib Channel Discovery / Handling Close

I'm looking for a recommended way to deal with unexpected channel closings through this library.

It can be seen from the documentation that an event has occurred, but I'm not entirely clear on how best to detect this event (I know it's simple, but I don't really understand how events are emitted at all, so bear with me), moreover, it's not obvious what I should do about it.

Should I keep track of which subscribers are using this channel and then rewrite them? What are others doing?

What else - isn't there a way to examine the Channel (or ConfirmedChannel) object and determine if everything is "good"? This would be almost preferable for an event-capturing approach, but I can't seem to find a way to do it (well, that's not entirely true). I did something about looking at the "accept" method on the channel to determine if this is bad, but it seems hacky).

Any guidance is greatly appreciated.

+3


source to share





All Articles