Skip to content

Instantly share code, notes, and snippets.

@ciaranarcher
Created June 25, 2012 15:06
Show Gist options
  • Save ciaranarcher/2989175 to your computer and use it in GitHub Desktop.
Save ciaranarcher/2989175 to your computer and use it in GitHub Desktop.
class ScriptTimingMsgProcessor < TorqueBox::Messaging::MessageProcessor
p "ScriptTimingMsgProcessor class loaded"
def on_message(body)
# The body will be of whatever type was published by the Producer
# the entire JMS message is available as a member variable called message()
p 'ScriptTimingMsgProcessor::on_message() called with ' + body.to_s
end
def on_error(exception)
# You may optionally override this to interrogate the exception. If you do,
# you're responsible for re-raising it to force a retry.
p 'ScriptTimingMsgProcessor::on_error() called with ' + exception.to_s
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment