Class: Rabbitek::MessageProcessor
- Inherits:
-
Object
- Object
- Rabbitek::MessageProcessor
- Extended by:
- Forwardable
- Includes:
- Loggable
- Defined in:
- lib/rabbitek/server/message_processor.rb
Overview
Single message processor
Instance Method Summary collapse
-
#initialize(starter, delivery_info, properties, payload) ⇒ MessageProcessor
constructor
A new instance of MessageProcessor.
- #process ⇒ Object
Methods included from Loggable
#debug, #error, #info, #logger, logger, #warn
Constructor Details
#initialize(starter, delivery_info, properties, payload) ⇒ MessageProcessor
Returns a new instance of MessageProcessor.
12 13 14 15 16 17 |
# File 'lib/rabbitek/server/message_processor.rb', line 12 def initialize(starter, delivery_info, properties, payload) @starter = starter @delivery_info = delivery_info @properties = properties @payload = payload end |
Instance Method Details
#process ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rabbitek/server/message_processor.rb', line 19 def process consumer.set_context metrics_add_processed_count hook_walker = Utils::HookWalker.new(Rabbitek.config.server_hooks) hook_walker.call!(consumer, ) { |*args| run_job(*args) } rescue StandardError => e (e) end |