@ComponentProfile(summary="Workflow that supports arbitrarily large messages", tag="workflow,base") public class LargeMessageWorkflow extends StandardWorkflow
This workflow is intended to provide better performance when faced with extremely large messages. The behaviour of StandardWorkflow is to attempt to clone the message before attempting trigger the workflow; This can take an exceptionally long time if the message is greater than 300Mb, leading to a simple FsConsumer to FsProducer taking something like 300000ms.
While error handling is supported, the current message in transit is provided to the
ProcessingExceptionHandler
; so best practise when using this workflow is to immediately archive it with
LargeFsProducer
and use that for recovery.
In the adapter configuration file this class is aliased as large-message-workflow which is the preferred alternative to the fully qualified classname when building your configuration.
eventHandler, log, startTime, stopTime
PREVIOUS_GUID_KEY, WORKFLOW_ID_KEY
Constructor and Description |
---|
LargeMessageWorkflow()
Creates a new instance with defaults to prevent NullPointerExceptions.
|
Modifier and Type | Method and Description |
---|---|
void |
onAdaptrisMessage(AdaptrisMessage msg)
It is the responsibility of implementations of this interface to ensure
that all
Exception s, including RuntimeException s,
are handled. |
protected void |
resubmitMessage(AdaptrisMessage msg)
Resubmit a message upon the channel becoming available again.
|
handleMessage
closeWorkflow, initialiseWorkflow, prepareWorkflow, startWorkflow, stopWorkflow
addConsumeLocation, addInterceptor, changeState, channelUnavailableWait, close, copyExceptionHeaders, disableMessageCount, doProduce, friendlyName, getChannelUnavailableWaitInterval, getComments, getConsumer, getDisableDefaultMessageCount, getInterceptors, getLogPayload, getMessageErrorHandler, getMessageLogger, getProduceExceptionHandler, getProducer, getSendEvents, getServiceCollection, getUniqueId, handleBadMessage, handleBadMessage, handleChannelUnavailable, handleProduceException, init, lastStartTime, lastStopTime, logSuccess, messageLogger, obtainChannel, obtainWorkflowId, prepare, processingStart, registerActiveMsgErrorHandler, registerChannel, registerEventHandler, requestClose, requestInit, requestStart, requestStop, retrieveActiveMsgErrorHandler, retrieveComponentState, sendMessageLifecycleEvent, setChannelUnavailableWaitInterval, setComments, setConsumer, setDisableDefaultMessageCount, setInterceptors, setLogPayload, setMessageErrorHandler, setMessageLogger, setProduceExceptionHandler, setProducer, setSendEvents, setServiceCollection, setUniqueId, start, stop, workflowEnd, workflowStart
public LargeMessageWorkflow()
Creates a new instance with defaults to prevent NullPointerExceptions.
public void onAdaptrisMessage(AdaptrisMessage msg)
AdaptrisMessageListener
It is the responsibility of implementations of this interface to ensure
that all Exception
s, including RuntimeException
s,
are handled. Failure to handle any Exception
will result in
undefined behaviour. Throwing a RuntimeException
to this
method is considered a bug.
Although most clients of implementations of this interface are likely to
be single-threaded, if implementations are not guaranteed to be thread
safe, they should be synchronized
or use some other locking
mechanism.
onAdaptrisMessage
in interface AdaptrisMessageListener
onAdaptrisMessage
in class StandardWorkflow
msg
- the AdaptrisMessage
to processprotected void resubmitMessage(AdaptrisMessage msg)
WorkflowImp
resubmitMessage
in class StandardWorkflow
msg
- the AdaptrisMessage.WorkflowImp.resubmitMessage(com.adaptris.core.AdaptrisMessage)