org.mule.processor
Class IdempotentRedeliveryPolicy
java.lang.Object
org.mule.processor.AbstractInterceptingMessageProcessorBase
org.mule.processor.AbstractInterceptingMessageProcessor
org.mule.processor.AbstractRedeliveryPolicy
org.mule.processor.IdempotentRedeliveryPolicy
- All Implemented Interfaces:
- AnnotatedObject, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, InterceptingMessageProcessor, MessageProcessor, MessageSource
public class IdempotentRedeliveryPolicy
- extends AbstractRedeliveryPolicy
Implement a retry policy for Mule. This is similar to JMS retry policies that will redeliver a message a maximum
number of times. If this maximum is exceeded, the message is sent to a dead letter queue, Here, if the processing of the messages
fails too often, the message is sent to the failedMessageProcessor MP, whence success is force to be returned, to allow
the message to be considered "consumed".
logger
protected Logger logger
IdempotentRedeliveryPolicy
public IdempotentRedeliveryPolicy()
initialise
public void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
- Specified by:
initialise
in interface Initialisable
- Overrides:
initialise
in class AbstractRedeliveryPolicy
- Throws:
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered from
dispose
public void dispose()
- Description copied from interface:
Disposable
- A lifecycle method where implementor should free up any resources. If an
exception is thrown it should just be logged and processing should continue.
This method should not throw Runtime exceptions.
- Specified by:
dispose
in interface Disposable
- Overrides:
dispose
in class AbstractRedeliveryPolicy
start
public void start()
throws MuleException
- Specified by:
start
in interface Startable
- Overrides:
start
in class AbstractRedeliveryPolicy
- Throws:
MuleException
process
public MuleEvent process(MuleEvent event)
throws MuleException
- Description copied from interface:
MessageProcessor
- Invokes the MessageProcessor.
- Parameters:
event
- MuleEvent to be processed
- Returns:
- optional response MuleEvent
- Throws:
MuleException
isUseSecureHash
public boolean isUseSecureHash()
setUseSecureHash
public void setUseSecureHash(boolean useSecureHash)
getMessageDigestAlgorithm
public String getMessageDigestAlgorithm()
setMessageDigestAlgorithm
public void setMessageDigestAlgorithm(String messageDigestAlgorithm)
getIdExpression
public String getIdExpression()
setIdExpression
public void setIdExpression(String idExpression)
setMessageProcessor
public void setMessageProcessor(MessageProcessor processor)
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.