Class: Tochtli::ReplyQueue::Consumer

Inherits:
Bunny::Consumer
  • Object
show all
Defined in:
lib/tochtli/reply_queue.rb

Instance Method Summary collapse

Constructor Details

#initialize(reply_queue, *args) ⇒ Consumer

Returns a new instance of Consumer.



113
114
115
116
# File 'lib/tochtli/reply_queue.rb', line 113

def initialize(reply_queue, *args)
  super(*args)
  @reply_queue = reply_queue
end

Instance Method Details

#recover_from_network_failureObject



118
119
120
121
122
123
124
125
126
# File 'lib/tochtli/reply_queue.rb', line 118

def recover_from_network_failure
  super
  @reply_queue.reconnect(@channel)
rescue Exception
  logger = channel.connection.logger
  logger.error $!
  logger.error $!.backtrace.join("\n")
  raise
end