Sha256: e18cbe4aae9c0529761d6d4ef6025de62024725875c75365bf063bb3245ce22c
Contents?: true
Size: 546 Bytes
Versions: 7
Compression:
Stored size: 546 Bytes
Contents
class Freddy module Consumers class ResponseConsumer def initialize(logger) @logger = logger end def consume(channel, queue, &block) @logger.debug "Consuming messages on #{queue.name}" queue.subscribe do |delivery| process_message(channel, queue, delivery, &block) end end private def process_message(channel, queue, delivery, &block) Consumers.log_receive_event(@logger, queue.name, delivery) block.call(delivery) end end end end
Version data entries
7 entries across 7 versions & 2 rubygems