@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,
java.util.function.Consumer<AdaptrisMessage> success,
java.util.function.Consumer<AdaptrisMessage> failure)
Handle a message with call back actions if a message is successful or failed.
|
protected void |
resubmitMessage(AdaptrisMessage msg)
Resubmit a message upon the channel becoming available again.
|
closeWorkflow, handleMessage, initialiseWorkflow, prepareWorkflow, startWorkflow, stopWorkflow
addConsumeLocation, addInterceptor, changeState, channelUnavailableWait, close, copyExceptionHeaders, disableMessageCount, doProduce, friendlyName, getChannelUnavailableWaitInterval, getComments, getConsumer, getDisableDefaultMessageCount, getInterceptors, 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, sendEvents, sendMessageLifecycleEvent, setChannelUnavailableWaitInterval, setComments, setConsumer, setDisableDefaultMessageCount, setInterceptors, setMessageErrorHandler, setMessageLogger, setProduceExceptionHandler, setProducer, setSendEvents, setServiceCollection, setUniqueId, start, stop, workflowEnd, workflowStart
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onAdaptrisMessage, onAdaptrisMessage
public LargeMessageWorkflow()
Creates a new instance with defaults to prevent NullPointerExceptions.
public void onAdaptrisMessage(AdaptrisMessage msg, java.util.function.Consumer<AdaptrisMessage> success, java.util.function.Consumer<AdaptrisMessage> failure)
AdaptrisMessageListener
onAdaptrisMessage
in interface AdaptrisMessageListener
onAdaptrisMessage
in class StandardWorkflow
msg
- the messagesuccess
- called on successfailure
- called on failureprotected void resubmitMessage(AdaptrisMessage msg)
WorkflowImp
resubmitMessage
in class StandardWorkflowImpl
msg
- the AdaptrisMessage.WorkflowImp.resubmitMessage(com.adaptris.core.AdaptrisMessage)