lib/rabbit_feed/consumer.rb in rabbit_feed-2.1.5 vs lib/rabbit_feed/consumer.rb in rabbit_feed-2.3.0
- old
+ new
@@ -3,12 +3,14 @@
extend self
attr_accessor :event_routing
def run
- ConsumerConnection.consume do |raw_event|
+ 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