diff --git a/lib/hutch/broker.rb b/lib/hutch/broker.rb index f44a8fde..1245e1de 100644 --- a/lib/hutch/broker.rb +++ b/lib/hutch/broker.rb @@ -52,10 +52,11 @@ def set_up_amqp_connection open_channel! exchange_name = @config[:mq_exchange] + exchange_options = { durable: true }.merge @config[:mq_exchange_options] logger.info "using topic exchange '#{exchange_name}'" with_bunny_precondition_handler('exchange') do - @exchange = @channel.topic(exchange_name, durable: true) + @exchange = @channel.topic(exchange_name, exchange_options) end end diff --git a/lib/hutch/config.rb b/lib/hutch/config.rb index 6dd89193..63e0469f 100644 --- a/lib/hutch/config.rb +++ b/lib/hutch/config.rb @@ -13,6 +13,7 @@ def self.initialize(params={}) mq_host: 'localhost', mq_port: 5672, mq_exchange: 'hutch', # TODO: should this be required? + mq_exchange_options: {}, mq_vhost: '/', mq_tls: false, mq_tls_cert: nil,