postwait / node-amqp

[UNMAINTAINED] node-amqp is an AMQP client for nodejs
MIT License
1.69k stars 357 forks source link

Set confirm.select to pre-baked exchanges as well #364

Closed afiestas closed 9 years ago

afiestas commented 9 years ago

confirm.select applies to the channel and NOT to the exchange so we have to set it even for pre-backed exhcanges.

This patch sends the confirmSelect method if the confirm option is set meaning that the open event (or the callback) will not happen until confirmSelectOk is received.

This fixes being able to use confirm with default exchanges.