Sha256: 88b59ae83d8b4e17a1d281ffc81d935cc4d3d97507713f0c0c01f002d06f7b02

Contents?: true

Size: 459 Bytes

Versions: 2

Compression:

Stored size: 459 Bytes

Contents

# A message processor that echos any messages sent to it back to
# another queue specified by the response_queue configuration option
module Torquebox
  module Messaging
    class EchoProcessor < TorqueBox::Messaging::MessageProcessor

      def initialize(options={})
        @response_queue = TorqueBox::Messaging::Queue.new(options['response_queue'])
      end

      def on_message(body)
        @response_queue.publish(body)
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
torquebox-messaging-2.1.2-java lib/torquebox/messaging/echo_processor.rb
torquebox-messaging-2.1.1-java lib/torquebox/messaging/echo_processor.rb