postwait/node-amqp — pull request #330 by mike-lang (2014-04-18 21:09:25+00:00)
Title: When confirm:true, don't consider exchange open until confirmSelectOk

If we don't do this the open callback for the exchange may fire prior to this._sequence gets initialized, so
the code that handles confirmation acks won't match the values saved on messages awaiting
confirmation and the confirmation callback never fires.

I'd have contributed tests, but I can't get the test suite to pass on my machine in a clean clone of postwait/master. Regardless, I thought I'd submit anyway. Without this change, the callback passed into exchange.publish never fires, and with it things work as expected within my application.