Method: RFlow::Components::RubyProcFilter#process_message

Defined in:
lib/rflow/components/ruby_proc_filter.rb

#process_message(input_port, input_port_key, connection, message) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/rflow/components/ruby_proc_filter.rb', line 13

def process_message(input_port, input_port_key, connection, message)
  begin
    if @filter_proc.call(message)
      filtered.send_message message
    else
      dropped.send_message message
    end
  rescue Exception => e
    RFlow.logger.debug "#{self.class} Message caused exception: #{e.class}: #{e.message}: #{e.backtrace}"
    errored.send_message message
  end
end