Class: Istox::BunnyBoot

Inherits:
Object
  • Object
show all
Defined in:
lib/istox/helpers/bunny_boot.rb

Class Method Summary collapse

Class Method Details

.connectObject



15
16
17
18
19
# File 'lib/istox/helpers/bunny_boot.rb', line 15

def connect
  connection = Bunny.new(data[:connect].symbolize_keys)
  connection.start
  $channel = connection.create_channel
end

.initialize!(amqp_config_path) ⇒ Object



5
6
7
8
9
# File 'lib/istox/helpers/bunny_boot.rb', line 5

def initialize!(amqp_config_path)
  @@amqp_config_path = amqp_config_path
  ::Istox::Publisher.initialize!(amqp_config_path)
  connect
end

.start_subscribeObject



11
12
13
# File 'lib/istox/helpers/bunny_boot.rb', line 11

def start_subscribe
  subscribe_to_queues
end