Sha256: ef148e580efe95a07c08a66c684a7b7f42d02d34abfef55503bdfa9920672a9b
Contents?: true
Size: 934 Bytes
Versions: 5
Compression:
Stored size: 934 Bytes
Contents
module RosettaQueue class Consumer < Base def self.receive(destination, options = {}) RosettaQueue::Adapter.instance.receive_once(Destinations.lookup(destination), options) rescue Exception=>e RosettaQueue.logger.error("Caught exception in Consumer.receive: #{$!}\n" + e.backtrace.join("\n\t")) end def self.delete(destination, options={}) RosettaQueue::Adapter.instance.delete(Destinations.lookup(destination), options) rescue Exception=>e RosettaQueue.logger.error("Caught exception in Consumer.delete: #{$!}\n" + e.backtrace.join("\n\t")) end def initialize(message_handler) @message_handler = message_handler end def receive connection.receive_with(@message_handler) rescue Exception=>e RosettaQueue.logger.error("Caught exception in Consumer#receive: #{$!}\n" + e.backtrace.join("\n\t")) end end end
Version data entries
5 entries across 5 versions & 2 rubygems