Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

explicit defaults for exchange durability and auto_delete

  • Loading branch information...
commit 75c1a04c91a54b1caeeca09393828a205b89b271 1 parent f03a869
@paukul paukul authored
Showing with 6 additions and 1 deletion.
  1. +3 −1 lib/amqp_logging/log_device.rb
  2. +3 −0  lib/amqp_logging/logger.rb
View
4 lib/amqp_logging/log_device.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
View
3  lib/amqp_logging/logger.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.