Class: RosettaQueue::Gateway::AmqpEventedAdapter

Inherits:
Amqp show all
Defined in:
lib/rosetta_queue/adapters/amqp.rb

Instance Method Summary collapse

Methods inherited from Amqp

#delete, #disconnect, #initialize, #receive_once, #receive_with, #send_message, #unsubscribe

Constructor Details

This class inherits a constructor from RosettaQueue::Gateway::Amqp

Instance Method Details

#exchange_strategy_for(destination, options) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/rosetta_queue/adapters/amqp.rb', line 52

def exchange_strategy_for(destination, options)
  case destination
  when /^fanout\./
    @exchange ||= EventedExchange::FanoutExchange.new(@adapter_settings, options)
  when /^topic\./
    raise "Sorry.  RosettaQueue can not process AMQP topics yet"
  when /^queue\./
    @exchange ||= EventedExchange::DirectExchange.new(@adapter_settings, options)
  else
    @exchange ||= EventedExchange::DirectExchange.new(@adapter_settings, options)
  end
end