Sha256: 59d5f88362611f44f18d56e6114178006c9574bdb1271b12fd3da43c00a8771b

Contents?: true

Size: 440 Bytes

Versions: 15

Compression:

Stored size: 440 Bytes

Contents

module RabbitFeed
  module Consumer
    extend self

    attr_accessor :event_routing

    def run
      ConsumerConnection.instance.consume do |raw_event|
        event = Event.deserialize raw_event
        RabbitFeed.log.info {{ event: :message_received, metadata: event.metadata }}
        event_routing.handle_event event
        RabbitFeed.log.info {{ event: :message_processed, metadata: event.metadata }}
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rabbit_feed-2.4.4 lib/rabbit_feed/consumer.rb
rabbit_feed-2.4.3 lib/rabbit_feed/consumer.rb
rabbit_feed-2.4.2 lib/rabbit_feed/consumer.rb
rabbit_feed-2.4.1 lib/rabbit_feed/consumer.rb
rabbit_feed-2.4.0 lib/rabbit_feed/consumer.rb
rabbit_feed-2.3.10 lib/rabbit_feed/consumer.rb
rabbit_feed-2.3.9 lib/rabbit_feed/consumer.rb
rabbit_feed-2.3.7 lib/rabbit_feed/consumer.rb
rabbit_feed-2.3.6 lib/rabbit_feed/consumer.rb
rabbit_feed-2.3.5 lib/rabbit_feed/consumer.rb
rabbit_feed-2.3.4 lib/rabbit_feed/consumer.rb
rabbit_feed-2.3.3 lib/rabbit_feed/consumer.rb
rabbit_feed-2.3.2 lib/rabbit_feed/consumer.rb
rabbit_feed-2.3.1 lib/rabbit_feed/consumer.rb
rabbit_feed-2.3.0 lib/rabbit_feed/consumer.rb