Class RetryMessageErrorHandler
- java.lang.Object
-
- com.adaptris.core.RootProcessingExceptionHandler
-
- com.adaptris.core.StandardProcessingExceptionHandler
-
- com.adaptris.core.RetryMessageErrorHandlerImp
-
- com.adaptris.core.RetryMessageErrorHandler
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,ErrorHandlerRegistrar
,EventHandlerAware
,ProcessingExceptionHandler
,StateManagedComponent
@ComponentProfile(summary="An exception handler instance that supports automated retries defined by schedule", tag="error-handling,base") public class RetryMessageErrorHandler extends RetryMessageErrorHandlerImp
MessageErrorHandler implementation that allows automatic retries for a problem message.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 byRetryMessageErrorHandlerImp.setRetryInterval(TimeInterval)
andRetryMessageErrorHandlerImp.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 configuredStandardProcessingExceptionHandler.getProcessingExceptionService()
.In the event that the
AdaptrisComponent
that owns this implementation is stopped or closed (usingComponentLifecycle.stop()
orComponentLifecycle.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
orWorkflow
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adaptris.core.RetryMessageErrorHandlerImp
RetryMessageErrorHandlerImp.RetryThread
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.RetryMessageErrorHandlerImp
executor, inProgress, IS_RETRY_KEY, RETRY_COUNT_KEY, retryList
-
Fields inherited from class com.adaptris.core.RootProcessingExceptionHandler
log
-
-
Constructor Summary
Constructors Constructor Description RetryMessageErrorHandler()
RetryMessageErrorHandler(Service... services)
RetryMessageErrorHandler(java.lang.Integer limit, TimeInterval retryInterval, Service... services)
RetryMessageErrorHandler(java.lang.String id, Service... services)
-
Method Summary
-
Methods inherited from class com.adaptris.core.RetryMessageErrorHandlerImp
failAllMessages, failFutureMessages, failMessage, failMessage, filterStarted, getRetryInterval, getRetryLimit, handleProcessingException, scheduleNextRun, setRetryInterval, setRetryLimit, start, stop, waitingForRetry
-
Methods inherited from class com.adaptris.core.StandardProcessingExceptionHandler
close, getProcessingExceptionService, hasConfiguredBehaviour, init, logErrorMessage, prepare, registeredWorkflows, registerEventHandler, registerWorkflow, setProcessingExceptionService
-
Methods inherited from class com.adaptris.core.RootProcessingExceptionHandler
changeState, getAlwaysHandleException, getParent, getUniqueId, notifyParent, onChildError, registerDigester, registerParent, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveDigester, setAlwaysHandleException, setUniqueId
-
-
-
-
Constructor Detail
-
RetryMessageErrorHandler
public RetryMessageErrorHandler()
-
RetryMessageErrorHandler
public RetryMessageErrorHandler(Service... services)
-
RetryMessageErrorHandler
public RetryMessageErrorHandler(java.lang.Integer limit, TimeInterval retryInterval, Service... services)
-
RetryMessageErrorHandler
public RetryMessageErrorHandler(java.lang.String id, Service... services)
-
-