After that exchange_options has a new attribute (autoDelete:true), I guess because it is the default way of working. But, I think that internally, the function should take care of not modifying the configuration object.
By the moment my solution is to stringify (JSON.stringify(exchange_options)) the object. That way, I am not passing and object that could be modified internally.
whenever you call to create exchange passing the options as an object (JSON) this is modified internally. Something like that:
[code] exchange_options = { type : "fanout", durable: true, confirm: true }; connection.exchange(name = exchangeName, options = exchange_options, function(exchange) { logger.debug("exchange options ", exchange_options); }); [/code]
After that exchange_options has a new attribute (autoDelete:true), I guess because it is the default way of working. But, I think that internally, the function should take care of not modifying the configuration object.
By the moment my solution is to stringify (JSON.stringify(exchange_options)) the object. That way, I am not passing and object that could be modified internally.