Class Receiver<M>
- All Implemented Interfaces:
FrankElement,HasApplicationContext,HasName,HasSender,HasTransactionAttribute,IbisExceptionListener,IConfigurable,IHasProcessState<M>,IMessageHandler<M>,IProvidesMessageBrowsers<M>,IScopeProvider,IThreadCountControllable,ManagableLifecycle,NameAware,ConfigurableLifecycle,EventThrowing,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
Adapter.
By choosing a listener, the Frank developer determines how the messages are received.
For example, an ApiListener receives RESTful HTTP requests and a
JavaListener receives messages from direct Java calls.
Apart from wrapping the listener, a
Receiver can be configured
to store received messages and to keep track of the processed / failed
status of these messages.
There are two kinds of listeners: synchronous listeners and asynchronous listeners. Synchronous listeners are expected to return a response. The system that triggers the receiver typically waits for a response before proceeding its operation. When a
ApiListener receives a HTTP request, the listener is expected to return a
HTTP response. Asynchronous listeners are not expected to return a response. The system that
triggers the listener typically continues without waiting for the adapter to finish. When a
receiver contains an asynchronous listener, it can have a sender that sends the transformed
message to its destination. Receivers with an asynchronous listener can also have an error sender that is used
by the receiver to send error messages. In other words: if the result state is SUCCESS then the
message is sent by the ordinary sender, while the error sender is used if the result state
is ERROR.
Transaction control
If
transacted is set to true, messages will be received and processed under transaction control.
This means that after a message has been read and processed and the transaction has ended, one of the following apply:
| situation | input listener | Pipeline | inProcess storage | summary of effect |
|---|---|---|---|---|
| successful | message read and committed | message processed | unchanged | message processed |
| procesing failed | message read and committed | message processing failed and rolled back | unchanged | message only transferred from listener to errroSender |
| listening failed | unchanged: listening rolled back | no processing performed | unchanged | no changes, input message remains on input available for listener |
| transfer to inprocess storage failed | unchanged: listening rolled back | no processing performed | unchanged | no changes, input message remains on input available for listener |
- It is processed correctly by the pipeline and removed from the input-queue, not present in inProcess storage
- It is not processed at all by the pipeline, or processing by the pipeline has been rolled back; the message is removed from the input queue and either (one of) still in inProcess storage
commit or rollback
If transacted is set to true, messages will be either committed or rolled back.
All message-processing transactions are committed, unless one or more of the following apply:
- The PipeLine is transacted and the exitState of the pipeline is not equal to SUCCESS
- a PipeRunException or another runtime-exception has been thrown by any Pipe or by the PipeLine
- the setRollBackOnly() method has been called on the userTransaction (not accessible by Pipes)
- Since:
- 4.2
- Author:
- Gerrit van Brakel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intShould be smaller than the transaction timeout as the delay takes place within the transaction.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringprotected final RunStateManagerstatic final Stringstatic final org.springframework.transaction.TransactionDefinitionstatic final org.springframework.transaction.TransactionDefinitionstatic final org.springframework.transaction.TransactionDefinitionFields inherited from class org.frankframework.core.TransactionAttributes
logFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcalculateAdjustedMaxBackoffDelay(Integer configuredMaxBackoffDelay) changeProcessState(RawMessageWrapper<M> message, ProcessState toState, String reason) Change message process state, via the listener of the receiver.protected voidShould only close resources when in state stopping (or error)!voidThis method is called by theAdapterto let the receiver do things to initialize itself before thestartListeningmethod is called.voidprotected voidsends a error message to the log and to the messagekeeper of the adaptervoidexceptionThrown(String errorMessage, Throwable t) voidexceptionThrown(HasName object, Throwable t) Inform the implementing class that the exceptiontoccurred inobject.protected voidfinishProcessingMessage(long processingDuration) getCachedErrorMessage(RawMessageWrapper<M> rawMessageWrapper) intintgetDeliveryCount(RawMessageWrapper<M> rawMessage) Get the delivery-count for the message.longprotected StringintgetMessageBrowser(ProcessState state) returns abrowserof messages that are in ProcessState 'state', and are stored in a storage managed by the listener itself (as opposed to a storage configured as a messageLog or errorStorage in the configuration).doubleget the number of messages received by this receiver.doubleGet the number of messages rejected (discarded or put in errorStorage).doubleget the number of duplicate messages received this receiver.intgetPhase()protected io.micrometer.core.instrument.DistributionSummarygetProcessStatistics(int threadsProcessing) Get therunstateof this receiver.voidincreaseBackoffIntervalAndWait(Throwable t, String description) voidprotected voidsends an informational message to the log and to the messagekeeper of the adapterprotected booleanisDeliveryRetryLimitExceededAfterMessageProcessed(RawMessageWrapper<M> messageWrapper) Returns true if the message should no longer be retried after it has failed in processing.protected booleanisDeliveryRetryLimitExceededBeforeMessageProcessing(RawMessageWrapper<M> rawMessageWrapper, PipeLineSession session, boolean manualRetry) returns true if message should not be processed when it is delivered.booleanisInRunState(RunState someRunState) booleanbooleanbooleanProvides the set of ProcessStates used by this listener.voidmoveInProcessToError(RawMessageWrapper<M> rawMessageWrapper, PipeLineSession session, Instant receivedDate, String comments, org.springframework.transaction.TransactionDefinition txDef) Move a message from the "in process" state or storage, to the error state or storage.protected voidvoidprocessRawMessage(IListener<M> origin, RawMessageWrapper<M> rawMessage, PipeLineSession session, boolean retryStatusAlreadyChecked) This method processes the raw message from the listener.processRequest(IPushingListener<M> origin, MessageWrapper<M> messageWrapper, PipeLineSession session) Process the received message withIMessageHandler.processRequest(IPushingListener, MessageWrapper, PipeLineSession).protected voidvoidvoidvoidretryMessage(String storageKey) final voidsetApplicationContext(org.springframework.context.ApplicationContext context) voidsetCheckForDuplicates(boolean b) If set totrue, each message is checked for presence in the messageLog.void(Only used whencheckForDuplicates=true) Indicates whether the messageid or the correlationid is used for checking presence in the message logvoidsetChompCharSize(String string) If set (>=0) and the character data length inside a xml element exceeds this size, the character data is chomped (with a clear comment)voidsetCorrelationIDNamespaceDefs(String correlationIDNamespaceDefs) Namespace definitions for correlationIDXPath.voidsetCorrelationIDStyleSheet(String string) Stylesheet to extract correlationID from messagevoidsetCorrelationIDXPath(String string) XPath expression to extract correlationId from messagevoidsetElementToMove(String string) If set, the character data in this XML element is stored inside a session key and in the message it is replaced by a reference to this session key:{sessionKey: elementToMoveSessionKey}voidsetElementToMoveChain(String string) LikeelementToMovebut element is preceded with all ancestor elements and separated by semicolons (e.g. adapter;pipeline;pipe)voidsetElementToMoveSessionKey(String string) (Only used whenelementToMoveorelementToMoveChainis set) Name of the session key wherein the character data is storedvoidsetErrorStorage(ITransactionalStorage<Serializable> errorStorage) Storage to keep track of messages that failed processingvoidsetForceRetryFlag(boolean b) voidsetHiddenInputSessionKeys(String string) Comma separated list of keys of session variables which are available when thePipelineSessionis created and of which the value will not be shown in the log (replaced by asterisks)voidsetHideMethod(IMessageBrowser.HideMethod hideMethod) Only used when hideRegex is not emptyvoidsetHideRegex(String hideRegex) Regular expression to mask strings in the errorStore/logStore and logfiles.voidsetLabelNamespaceDefs(String labelNamespaceDefs) Namespace definitions for labelXPath.voidsetLabelStyleSheet(String string) Stylesheet to extract label from messagevoidsetLabelXPath(String string) XPath expression to extract label from messagevoidsetListener(IListener<M> newListener) Sets the listener used to receive messages from.voidsetMaxBackoffDelay(Integer maxBackoffDelaySeconds) After a message has an error in processing, there is a small delay before processing the next message before processing the next message or retrying the failed message.voidDeprecated, for removal: This API element is subject to removal in a future version.voidThe number of times a processing attempt is automatically retried after an exception is caught or rollback is experienced.voidsetMessageLog(ITransactionalStorage<Serializable> messageLog) Storage to keep track of all messages processed correctlyvoidSets the name of the Receiver, as known to the Adapter.voidNumber of connection attempts to put the adapter in warning statusvoidsetNumThreads(int newNumThreads) The number of threads that may execute a Pipeline concurrently (only for pulling listeners)voidsetNumThreadsPolling(int i) The number of threads that are actively polling for messages concurrently. '0' means 'limited only bynumthreads' (only for pulling listeners)voidsetOnError(Receiver.OnError value) One of 'continue', 'recover' or 'close'.voidsetPollInterval(int i) The number of seconds waited after an unsuccessful poll attempt, before another poll attempt is made.voidsetProcessResultCacheSize(int processResultCacheSize) Size of the cache to keep process results, used by maxRetriesvoidsetRemoveCompactMsgNamespaces(boolean b) voidsetReturnedSessionKeys(String string) Deprecated, for removal: This API element is subject to removal in a future version.voidsetRunState(RunState state) Changes runstate.voidsetSender(ICorrelatedSender sender) Sender to which the response (output ofPipeLine) should be sent.voidsetStartTimeout(int i) timeout (in seconds) to start receiver.voidsetStopTimeout(int i) timeout (in seconds) to stop receiver.voidstart()protected voidvoidstop()voidsuspendReceiverThread(int delayTimeInSeconds) Suspend the receiver fordelayTimeInSecondssecondsProvides the set of ProcessStates that a message in the specified state can be moved to, e.g. from a MessageBrowser for that state.protected voidmust lead to a 'closeAllResources()' and runstate must be 'STOPPING' if IPushingListener -> call closeAllResources() if IPullingListener -> PullingListenerContainer has to call closeAllResources();protected voidthrowEvent(String eventCode) toString()Returns a toString of this class by introspection and the toString() value of its listener.protected Receiver.ProcessStatusCacheItemupdateMessageReceiveCount(RawMessageWrapper<M> rawMessageWrapper) Call this method exactly once per every try to process a message to initialize the internally cached receive-count for the messageId.protected voidsends a warning to the log and to the messagekeeper of the adapterMethods inherited from class org.frankframework.core.TransactionAttributes
configureTransactionAttributes, isTransacted, isTransacted, setTransacted, setTransactionTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.frankframework.lifecycle.ConfigurableLifecycle
isAutoStartupMethods inherited from interface org.frankframework.monitoring.EventThrowing
getAdapterMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface org.frankframework.core.HasTransactionAttribute
getTransactionAttribute, getTransactionTimeout, getTxDef, setTransactionAttributeMethods inherited from interface org.frankframework.core.ManagableLifecycle
isConfigured, isRunningMethods inherited from interface org.springframework.context.SmartLifecycle
stop
-
Field Details
-
TXSUPPORTED
public static final org.springframework.transaction.TransactionDefinition TXSUPPORTED -
TXREQUIRED
public static final org.springframework.transaction.TransactionDefinition TXREQUIRED -
TXNEW_CTRL
public static final org.springframework.transaction.TransactionDefinition TXNEW_CTRL -
THREAD_CONTEXT_KEY_TYPE
- See Also:
-
RCV_CONFIGURED_MONITOR_EVENT
- See Also:
-
RCV_CONFIGURATIONEXCEPTION_MONITOR_EVENT
- See Also:
-
RCV_STARTED_RUNNING_MONITOR_EVENT
- See Also:
-
RCV_SHUTDOWN_MONITOR_EVENT
- See Also:
-
RCV_SUSPENDED_MONITOR_EVENT
- See Also:
-
RCV_RESUMED_MONITOR_EVENT
- See Also:
-
RCV_THREAD_EXIT_MONITOR_EVENT
- See Also:
-
RCV_MESSAGE_TO_ERRORSTORE_EVENT
- See Also:
-
RCV_MESSAGE_LOG_COMMENTS
- See Also:
-
RCV_SUSPENSION_MESSAGE_THRESHOLD
public static final int RCV_SUSPENSION_MESSAGE_THRESHOLD- See Also:
-
DEFAULT_MAX_BACKOFF_DELAY_KEY
- See Also:
-
DEFAULT_MAX_BACKOFF_DELAY
public static final int DEFAULT_MAX_BACKOFF_DELAYShould be smaller than the transaction timeout as the delay takes place within the transaction. WebSphere default transaction timeout is 120.- See Also:
-
RETRY_FLAG_SESSION_KEY
- See Also:
-
runState
-
-
Constructor Details
-
Receiver
public Receiver()
-
-
Method Details
-
getLogPrefix
-
info
sends an informational message to the log and to the messagekeeper of the adapter -
warn
sends a warning to the log and to the messagekeeper of the adapter -
error
sends a error message to the log and to the messagekeeper of the adapter -
setApplicationContext
public final void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext context) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
openAllResources
- Throws:
ListenerExceptionTimeoutException
-
tellResourcesToStop
protected void tellResourcesToStop()must lead to a 'closeAllResources()' and runstate must be 'STOPPING' if IPushingListener -> call closeAllResources() if IPullingListener -> PullingListenerContainer has to call closeAllResources(); -
closeAllResources
protected void closeAllResources()Should only close resources when in state stopping (or error)! this should be the only trigger to change the state to stopped On exit resources must be 'closed' so the receiver RunState can be set to 'STOPPED' -
propagateName
protected void propagateName() -
configure
This method is called by theAdapterto let the receiver do things to initialize itself before thestartListeningmethod is called.- Specified by:
configurein interfaceIConfigurable- Overrides:
configurein classTransactionAttributes- Throws:
ConfigurationException- when initialization did not succeed.- See Also:
-
calculateAdjustedMaxBackoffDelay
-
start
public void start()- Specified by:
startin interfaceConfigurableLifecycle- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
knownProcessStates
Description copied from interface:IHasProcessStateProvides the set of ProcessStates used by this listener.- Specified by:
knownProcessStatesin interfaceIHasProcessState<M>
-
targetProcessStates
Description copied from interface:IHasProcessStateProvides the set of ProcessStates that a message in the specified state can be moved to, e.g. from a MessageBrowser for that state.- Specified by:
targetProcessStatesin interfaceIHasProcessState<M>
-
changeProcessState
public RawMessageWrapper<M> changeProcessState(RawMessageWrapper<M> message, ProcessState toState, String reason) throws ListenerException Change message process state, via the listener of the receiver. The listener must supportIHasProcessState. As an extra side-effect of this method implementation, if thetoStateisProcessState.AVAILABLEthen any recorded processing history status is reset so that a message can be manually retried.- Specified by:
changeProcessStatein interfaceIHasProcessState<M>- Parameters:
message- Message for which to change state.toState- Desired state of the messagereason- Reason for changing the state- Returns:
- Updated message
- Throws:
ListenerException- thrown if changing the state by the listener fails.IllegalStateException- thrown if the listener does not support changing process states.
-
getMessageBrowser
Description copied from interface:IProvidesMessageBrowsersreturns abrowserof messages that are in ProcessState 'state', and are stored in a storage managed by the listener itself (as opposed to a storage configured as a messageLog or errorStorage in the configuration).- Specified by:
getMessageBrowserin interfaceIProvidesMessageBrowsers<M>
-
startProcessingMessage
protected void startProcessingMessage() -
finishProcessingMessage
protected void finishProcessingMessage(long processingDuration) -
moveInProcessToError
public void moveInProcessToError(RawMessageWrapper<M> rawMessageWrapper, PipeLineSession session, Instant receivedDate, String comments, org.springframework.transaction.TransactionDefinition txDef) Move a message from the "in process" state or storage, to the error state or storage.- Parameters:
rawMessageWrapper- Wrapper for the raw message, may be an instance ofRawMessageWrapperorMessageWrapper. If an instance ofRawMessageWrapperthen theIListenerwill be used to extract the fullMessageobject to be sent to the error storage.session-PipeLineSessionof the process.receivedDate- Timestamp of when the message was received.comments- Processing comments and error message regarding the reason the message was rejected.txDef-TransactionDefinitionfor the transaction to be used for moving the message to error state / storage.
-
processRequest
public Message processRequest(IPushingListener<M> origin, @Nonnull MessageWrapper<M> messageWrapper, @Nonnull PipeLineSession session) throws ListenerException Process the received message withIMessageHandler.processRequest(IPushingListener, MessageWrapper, PipeLineSession).
A messageId is generated that is unique and consists of the name of this listener and a GUID.If the receiver is transactional, then this method will enforce the transactional requirements specified by
HasTransactionAttribute.setTransactionAttribute(TransactionAttribute).N.B. callers of this method should clear the remaining ThreadContext if it's not to be returned to their callers.
- Specified by:
processRequestin interfaceIMessageHandler<M>- Throws:
ListenerException
-
processRawMessage
public void processRawMessage(IListener<M> origin, RawMessageWrapper<M> rawMessage, @Nonnull PipeLineSession session, boolean retryStatusAlreadyChecked) throws ListenerException This method processes the raw message from the listener.
The method assumes that a transaction has been started where necessary.- Specified by:
processRawMessagein interfaceIMessageHandler<M>- Throws:
ListenerException
-
retryMessage
- Throws:
ListenerException
-
updateMessageReceiveCount
@Nonnull protected Receiver.ProcessStatusCacheItem updateMessageReceiveCount(@Nonnull RawMessageWrapper<M> rawMessageWrapper) Call this method exactly once per every try to process a message to initialize the internally cached receive-count for the messageId. If the listener implementsIKnowsDeliveryCountthen the receiveCount will be set to theIKnowsDeliveryCount.getDeliveryCount(RawMessageWrapper).- Parameters:
rawMessageWrapper- The raw message for which to set the receiveCount.
-
getCachedErrorMessage
-
getDeliveryCount
Get the delivery-count for the message. If the listener implementsIKnowsDeliveryCountthen get the delivery count from the listener, otherwise get it from the internal process-result cache.- Parameters:
rawMessage-RawMessageWrapperfor which to retrieve the delivery count- Returns:
- Number of times the message has been delivered, minimum is always 1 (for the first delivery of the message).
-
isDeliveryRetryLimitExceededAfterMessageProcessed
protected boolean isDeliveryRetryLimitExceededAfterMessageProcessed(@Nonnull RawMessageWrapper<M> messageWrapper) Returns true if the message should no longer be retried after it has failed in processing.- Parameters:
messageWrapper- Message for which to check delivery count- Returns:
trueif message should no longer be retried,falseif it should.
-
isDeliveryRetryLimitExceededBeforeMessageProcessing
protected boolean isDeliveryRetryLimitExceededBeforeMessageProcessing(RawMessageWrapper<M> rawMessageWrapper, PipeLineSession session, boolean manualRetry) throws ListenerException returns true if message should not be processed when it is delivered.- Throws:
ListenerException
-
exceptionThrown
Description copied from interface:IbisExceptionListenerInform the implementing class that the exceptiontoccurred inobject.- Specified by:
exceptionThrownin interfaceIbisExceptionListener
-
exceptionThrown
-
getEventSourceName
- Specified by:
getEventSourceNamein interfaceEventThrowing
-
throwEvent
-
resetBackoffDelay
public void resetBackoffDelay() -
increaseBackoffIntervalAndWait
-
suspendReceiverThread
public void suspendReceiverThread(int delayTimeInSeconds) Suspend the receiver fordelayTimeInSecondsseconds- Parameters:
delayTimeInSeconds- Number of seconds the receiver thread should be suspended from processing new messages.
-
isThreadCountReadable
public boolean isThreadCountReadable()- Specified by:
isThreadCountReadablein interfaceIThreadCountControllable
-
isThreadCountControllable
public boolean isThreadCountControllable()- Specified by:
isThreadCountControllablein interfaceIThreadCountControllable
-
getCurrentThreadCount
public int getCurrentThreadCount()- Specified by:
getCurrentThreadCountin interfaceIThreadCountControllable
-
getMaxThreadCount
public int getMaxThreadCount()- Specified by:
getMaxThreadCountin interfaceIThreadCountControllable
-
increaseThreadCount
public void increaseThreadCount()- Specified by:
increaseThreadCountin interfaceIThreadCountControllable
-
decreaseThreadCount
public void decreaseThreadCount()- Specified by:
decreaseThreadCountin interfaceIThreadCountControllable
-
setRunState
Changes runstate. Always stops the receiver when state is `**ERROR**` -
getRunState
Get therunstateof this receiver.- Specified by:
getRunStatein interfaceManagableLifecycle
-
getPhase
public int getPhase()- Specified by:
getPhasein interfaceConfigurableLifecycle- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.springframework.context.SmartLifecycle
-
isInRunState
-
getProcessStatistics
protected io.micrometer.core.instrument.DistributionSummary getProcessStatistics(int threadsProcessing) -
isOnErrorContinue
public boolean isOnErrorContinue() -
getMessagesReceived
public double getMessagesReceived()get the number of messages received by this receiver. -
getMessagesRetried
public double getMessagesRetried()get the number of duplicate messages received this receiver. -
getMessagesRejected
public double getMessagesRejected()Get the number of messages rejected (discarded or put in errorStorage). -
getLastMessageDate
public long getLastMessageDate() -
resetNumberOfExceptionsCaughtWithoutMessageBeingReceived
public void resetNumberOfExceptionsCaughtWithoutMessageBeingReceived() -
toString
Returns a toString of this class by introspection and the toString() value of its listener. -
setListener
Sets the listener used to receive messages from. -
setErrorStorage
Storage to keep track of messages that failed processing -
setMessageLog
Storage to keep track of all messages processed correctly -
setName
Sets the name of the Receiver, as known to the Adapter. If the listenergetName()is empty, the name of this object is given to the listener. -
setOnError
One of 'continue', 'recover' or 'close'. Controls the behaviour of the Receiver, when it encounters an error during processing of a message.- Default value
- CONTINUE
-
setNumThreads
public void setNumThreads(int newNumThreads) The number of threads that may execute a Pipeline concurrently (only for pulling listeners)- Default value
- 1
-
setNumThreadsPolling
public void setNumThreadsPolling(int i) The number of threads that are actively polling for messages concurrently. '0' means 'limited only bynumthreads' (only for pulling listeners)- Default value
- 1
-
setPollInterval
public void setPollInterval(int i) The number of seconds waited after an unsuccessful poll attempt, before another poll attempt is made. Only for polling listeners, not for e.g. jms, webservice or javaListeners- Default value
- 10
-
setStartTimeout
public void setStartTimeout(int i) timeout (in seconds) to start receiver. If this timeout is exceeded, the Receiver startup is aborted and all resources closed and the receiver will be in stateEXCEPTION_STARTINGand a new start command may be issued again. -
setStopTimeout
public void setStopTimeout(int i) timeout (in seconds) to stop receiver. If this timeout is exceeded, stopping will be aborted and the receiver will be in stateEXCEPTION_STOPPING. The receiver will no longer be running but some resources might not have been cleaned up properly. -
setCheckForDuplicates
public void setCheckForDuplicates(boolean b) If set totrue, each message is checked for presence in the messageLog. If already present, it is not processed again. Only required for non XA compatible messaging. Requires messageLog!- Default value
- false
-
setCheckForDuplicatesMethod
(Only used whencheckForDuplicates=true) Indicates whether the messageid or the correlationid is used for checking presence in the message log- Default value
- MESSAGEID
-
setMaxDeliveries
@Deprecated(forRemoval=true, since="9.0") @ConfigurationWarning("This property has been deprecated, please use maxRetries instead.") public void setMaxDeliveries(Integer i) Deprecated, for removal: This API element is subject to removal in a future version.The maximum retry count after which to stop processing the message. If equal to or lower than 0, the retry count is ignored. This property is deprecated -- usemaxRetriesinstead. Until removal of this property, the code will treat this property as the same asmaxRetries. If both are set in a configuration, then the highest value is used. -
setMaxRetries
The number of times a processing attempt is automatically retried after an exception is caught or rollback is experienced. IfmaxRetries < 0the number of attempts is infinite- Default value
- 1, or 3 for JMS Listeners or other listeners implementing
IKnowsDeliveryCount.
-
setProcessResultCacheSize
public void setProcessResultCacheSize(int processResultCacheSize) Size of the cache to keep process results, used by maxRetries- Default value
- 100
-
setReturnedSessionKeys
@Deprecated(forRemoval=true, since="7.9.0") @ConfigurationWarning("attribute is no longer used. Please use attribute returnedSessionKeys of the JavaListener if the set of sessionsKeys that can be returned to callers session must be limited.") public void setReturnedSessionKeys(String string) Deprecated, for removal: This API element is subject to removal in a future version. -
setCorrelationIDXPath
XPath expression to extract correlationId from message -
setCorrelationIDNamespaceDefs
Namespace definitions for correlationIDXPath. Must be in the form of a comma or space separated list ofprefix=namespaceuri-definitions -
setCorrelationIDStyleSheet
Stylesheet to extract correlationID from message -
setLabelXPath
XPath expression to extract label from message -
setLabelNamespaceDefs
Namespace definitions for labelXPath. Must be in the form of a comma or space separated list ofprefix=namespaceuri-definitions -
setLabelStyleSheet
Stylesheet to extract label from message -
setChompCharSize
If set (>=0) and the character data length inside a xml element exceeds this size, the character data is chomped (with a clear comment) -
setElementToMove
If set, the character data in this XML element is stored inside a session key and in the message it is replaced by a reference to this session key:{sessionKey: elementToMoveSessionKey} -
setElementToMoveSessionKey
(Only used whenelementToMoveorelementToMoveChainis set) Name of the session key wherein the character data is stored- Default value
- ref_ + the name of the element
-
setElementToMoveChain
LikeelementToMovebut element is preceded with all ancestor elements and separated by semicolons (e.g. adapter;pipeline;pipe) -
setRemoveCompactMsgNamespaces
public void setRemoveCompactMsgNamespaces(boolean b) -
setHideRegex
Regular expression to mask strings in the errorStore/logStore and logfiles. Every character between to the strings in this expression will be replaced by a '*'. For example, the regular expression (?<=<party>).*?(?=</party>) will replace every character between keys <party> and </party> -
setHideMethod
Only used when hideRegex is not empty- Default value
- all
-
setHiddenInputSessionKeys
Comma separated list of keys of session variables which are available when thePipelineSessionis created and of which the value will not be shown in the log (replaced by asterisks) -
setForceRetryFlag
public void setForceRetryFlag(boolean b) If set totrue, every message read will be processed as if it is being retried, by setting a session variable to "retry"<M>.- Default value
- false
-
setNumberOfExceptionsCaughtWithoutMessageBeingReceivedThreshold
public void setNumberOfExceptionsCaughtWithoutMessageBeingReceivedThreshold(int number) Number of connection attempts to put the adapter in warning status- Default value
- 5
-
setMaxBackoffDelay
After a message has an error in processing, there is a small delay before processing the next message before processing the next message or retrying the failed message. This is so that errors coming from external systems so not overload those external systems.The delay doubles after every failure, until the maximum set here is reached. See: https://en.wikipedia.org/wiki/Exponential_backoff.
If the transaction timeout can be determined, then the backoff-delay is capped by half the transaction timeout to avoid messages automatically timing out.
There is no backoff-time after a message is successfully processed. After a message is successfully processed, the actual backoff-time is reset to 1 second.
If set to 0, then there is no delay after messages that had an error.
If this is not set on the receiver, then a default is taken from the configuration property ${receiver.defaultMaxBackoffDelay} which defaults to 60 seconds.
- Parameters:
maxBackoffDelaySeconds- Maximum backoff-time in seconds before retrying a message, after an error occurred during processing.
-