Permalink
Browse files

explicit defaults for exchange durability and auto_delete

  • Loading branch information...
paukul committed Nov 3, 2010
1 parent f03a869 commit 75c1a04c91a54b1caeeca09393828a205b89b271
Showing with 6 additions and 1 deletion.
  1. +3 −1 lib/amqp_logging/log_device.rb
  2. +3 −0 lib/amqp_logging/logger.rb
@@ -46,7 +46,9 @@ def reset_amqp
def exchange
bunny.start unless bunny.connected?
- @exchange ||= bunny.exchange(configuration[:exchange], :type => :topic)
+ @exchange ||= bunny.exchange(configuration[:exchange], :durable => configuration[:exchange_durable],
+ :auto_delete => configuration[:exchange_auto_delete],
+ :type => configuration[:exchange_type])
end
def bunny
@@ -6,6 +6,9 @@ class AMQPLogging::Logger < ::Logger
:exchange => "logging_exchange",
:queue => "logging_queue",
:routing_key => "logs"
+ :exchange_durable => true,
+ :exchange_auto_delete => false,
+ :exchange_type => :topic,
}
attr_accessor :extra_attributes

0 comments on commit 75c1a04

Please sign in to comment.