Module: Euston::RabbitMq::Exchanges

Included in:
HandlerBinder, RetryingSubscription
Defined in:
lib/euston-rabbitmq/euston/exchanges.rb

Instance Method Summary collapse

Instance Method Details

#default_exchange_optionsObject



4
5
6
# File 'lib/euston-rabbitmq/euston/exchanges.rb', line 4

def default_exchange_options
  { :durable => true, :nowait => false }
end

#default_publish_optionsObject



8
9
10
# File 'lib/euston-rabbitmq/euston/exchanges.rb', line 8

def default_publish_options
  { :immediate => false, :mandatory => true, :persistent => true }
end

#get_exchange(channel, name, opts = {}) ⇒ Object



12
13
14
# File 'lib/euston-rabbitmq/euston/exchanges.rb', line 12

def get_exchange channel, name, opts = {}
  channel.exchange name.to_s, default_exchange_options.merge(:type => :topic).merge(opts)
end