node-amqp icon indicating copy to clipboard operation
node-amqp copied to clipboard

autoDelete: false ignored

Open danwdart opened this issue 10 years ago • 1 comments

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

danwdart avatar Jun 24 '14 10:06 danwdart

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 || {}

rpadovani avatar Nov 06 '15 23:11 rpadovani