vendor/bundle/ruby/1.8/gems/activemessaging-0.9.0/lib/activemessaging/gateway.rb
# Starts up an message listener to start polling for messages on each configured connection, and dispatching processing
Starts up an message listener to start polling for messages on each configured connection, and dispatching processing
Starts up an message listener to start polling for messages on each configured connection and dispatching processing
def _dispatch(message)
        abort = false
        processed = false
        subscriptions.each do |key, subscription| 
          if message.matches_subscription?(subscription) then
            processed = true
            routing = {
              :receiver    => subscription.processor_class, 
              :destination => subscription.destination,
              :direction   => :incoming
            }
            begin
              execute_filter_chain(:incoming, message, routing) do |m|
                result = subscription.processor_class.new.process!(m)
              end
            rescue ActiveMessaging::AbortMessageException
              abort_message subscription, message
              abort = true
              return
            ensure
              acknowledge_message subscription, message unless abort
            end
          end
        end
        ActiveMessaging.logger.error("No-one responded to #{message}") unless processed
      end
def _dispatch ( message ) abort = false processed = false subscriptions . each do | key , subscription | if message . matches_subscription? ( subscription ) then processed = true routing = { :receiver => subscription . processor_class , :destination => subscription . destination , :direction => :incoming } begin execute_filter_chain ( :incoming , message , routing ) do | m | result = subscription . processor_class . new . process! ( m ) end rescue ActiveMessaging :: AbortMessageException abort_message subscription , message abort = true return ensure acknowledge_message subscription , message unless abort end end end ActiveMessaging . logger . error ( "No-one responded to #{message}" ) unless processed end
Starts up an message listener to start polling for messages on each configured connection, and dispatching processing
Starts up an message listener to start polling for messages on each configured connection and dispatching processing
message