Closed humanchimp closed 11 years ago
I've tentatively decided that this is not going to be practical. Within the library, I am not in a position to make assumptions about the application, and once I start replaying queue bindings, then events start firing, which may lead to double listeners being added, and broken behavior. Closing.
ISTM that the auto-reconnect logic only works when dealing with queues that are
autoDelete:false
. I am still investigating this, but I believe it has to do with the old bindings not being replayed against the newly-redeclared exchanges and queues. This also affectsexclusive:true
queues, which are implicitlyautoDelete:true
. So basically, it almost works, but then messages just get /dev/nulled since the new exchanges have no bindings.I'll follow up with a pull request if I can figure this out.
Edit: looks like that's right, the bindings aren't getting replayed: http://d.pr/i/4yjc
Edit: it seems obvious that any messages from before the disconnect will be lost when we are dealing with exclusive queues. There is no practical solution to that, so any solution to this will necessitate different semantics than the current reconnection logic. I'm not convinced that it's wise to replay a topology like this, but alternatives are worse.