class Evrone::Common::AMQP::Config
Attributes
callbacks[RW]
content_type[RW]
default_exchange_options[RW]
default_exchange_type[RW]
default_publish_options[RW]
default_queue_options[RW]
heartbeat[RW]
logger[RW]
pool_timeout[RW]
spawn_attempts[RW]
url[RW]
Public Class Methods
new()
click to toggle source
# File lib/evrone/common/amqp/config.rb, line 13 def initialize reset! end
Public Instance Methods
default_exchange_name()
click to toggle source
# File lib/evrone/common/amqp/config.rb, line 33 def default_exchange_name "amq.#{default_exchange_type}" end
formatter()
click to toggle source
# File lib/evrone/common/amqp/config.rb, line 17 def formatter Common::AMQP::Formatter end
on_error(&block)
click to toggle source
# File lib/evrone/common/amqp/config.rb, line 29 def on_error(&block) callbacks[:on_error] = block end
reset!()
click to toggle source
# File lib/evrone/common/amqp/config.rb, line 37 def reset! @url = nil @logger = ::Logger.new(STDOUT) @default_exchange_type = :topic @pool_timeout = 0.1 @heartbeat = 10 @publishing_builder = nil @recieving_builder = nil @subscribing_builder = nil @spawn_attempts = 5 @content_type = 'application/json' @callbacks = {} @default_exchange_options = { durable: true, auto_delete: false } @default_queue_options = { durable: true, autodelete: false, exclusive: false } @default_publish_options = { durable: false } end