@ComponentProfile(summary="An exception handler instance that supports automated retries defined by schedule", tag="error-handling,base") public class RetryMessageErrorHandler extends RetryMessageErrorHandlerImp
This implementation keeps the AdaptrisMessage
that was consumed in memory, and periodically retries the message in the
workflow that failed; the retry schedule and maximum number of retries is determined by RetryMessageErrorHandlerImp.setRetryInterval(TimeInterval)
and RetryMessageErrorHandlerImp.setRetryLimit(Integer)
respectively. If the retry count exceeds the maximum number of retries then the message is
deemed to have failed, and passed off to any configured StandardProcessingExceptionHandler.getProcessingExceptionService()
.
In the event that the AdaptrisComponent
that owns this implementation is stopped or closed (using
ComponentLifecycle.stop()
or ComponentLifecycle.close()
then all messages are deemed to have failed, and treated as
a message that has failed.
Note that messages are not guaranteed to be in order (even if they were originally) once a message has entered retry mode. Also
note that if a RetryMessageErrorHandler is configured as a direct child of Channel
or Workflow
then an exception
that causes a restart of the entire channel will force all messages to 'fail' as this implementation will be stopped as part of
the parent component restart.
In the adapter configuration file this class is aliased as retry-message-error-handler which is the preferred alternative to the fully qualified classname when building your configuration.
RetryMessageErrorHandlerImp.RetryThread
executor, inProgress, IS_RETRY_KEY, RETRY_COUNT_KEY, retryList
log
Constructor and Description |
---|
RetryMessageErrorHandler() |
RetryMessageErrorHandler(java.lang.Integer limit,
TimeInterval retryInterval,
Service... services) |
RetryMessageErrorHandler(Service... services) |
RetryMessageErrorHandler(java.lang.String id,
Service... services) |
failAllMessages, failFutureMessages, failMessage, failMessage, filterStarted, getRetryInterval, getRetryLimit, handleProcessingException, scheduleNextRun, setRetryInterval, setRetryLimit, start, stop, waitingForRetry
close, getProcessingExceptionService, hasConfiguredBehaviour, init, logErrorMessage, prepare, registeredWorkflows, registerEventHandler, registerWorkflow, setProcessingExceptionService
changeState, getAlwaysHandleException, getParent, getUniqueId, notifyParent, onChildError, registerDigester, registerParent, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveDigester, setAlwaysHandleException, setUniqueId
public RetryMessageErrorHandler()
public RetryMessageErrorHandler(Service... services)
public RetryMessageErrorHandler(java.lang.Integer limit, TimeInterval retryInterval, Service... services)
public RetryMessageErrorHandler(java.lang.String id, Service... services)