Methods

Files

Class/Module Index [+]

Quicksearch

ApplicationProcessor

Public Instance Methods

on_error(err) click to toggle source

Default on_error implementation - logs standard errors but keeps processing. Other exceptions are raised. Have on_error throw ActiveMessaging::AbortMessageException when you want a message to be aborted/rolled back, meaning that it can and should be retried (idempotency matters here). Retry logic varies by broker - see individual adapter code and docs for how it will be treated

# File lib/generators/active_messaging/install/templates/application_processor.rb, line 7
def on_error(err)
  if (err.kind_of?(StandardError))
    logger.error "ApplicationProcessor::on_error: #{err.class.name} rescued:\n" +        err.message + "\n" +        "\t" + err.backtrace.join("\n\t")
  else
    logger.error "ApplicationProcessor::on_error: #{err.class.name} raised: " + err.message
    raise err
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.