postwait / node-amqp

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

autoDelete: false ignored #344

Open danwdart opened 10 years ago

danwdart commented 10 years ago

Seems I tried to use the options:

{ type: 'topic', durable: true, autoDelete: false, confirm: true }

however the autoDelete was ignored (although documented) as the exchange was created with autoDelete on...

Cheers Dan

rpadovani commented 8 years ago

Confirmed, it's a typo in the code, this patch fixes it (I just started to use the library, I'll try to submit a pacht in next days):

--- a/lib/exchange.js
+++ b/lib/exchange.js
@@ -99,7 +99,7 @@ Exchange.prototype._onMethod = function (channel, method, args) {
             , type:       this.options.type || 'topic'
             , passive:    !!this.options.passive
             , durable:    !!this.options.durable
-            , autoDelete: !!this.options.autoDelete
+            , auto_delete: !!this.options.autoDelete
             , internal:   !!this.options.internal
             , noWait:     false
             , "arguments":this.options.arguments || {}