@Metadata(label="spring,configuration,error") public class ErrorHandlerDefinition extends org.apache.camel.model.IdentifiedType
Constructor and Description |
---|
ErrorHandlerDefinition() |
Modifier and Type | Method and Description |
---|---|
String |
getDeadLetterHandleNewException() |
String |
getDeadLetterUri() |
String |
getExecutorServiceRef() |
org.apache.camel.LoggingLevel |
getLevel() |
String |
getLogName() |
String |
getOnExceptionOccurredRef() |
String |
getOnPrepareFailureRef() |
String |
getOnRedeliveryRef() |
CamelRedeliveryPolicyFactoryBean |
getRedeliveryPolicy() |
String |
getRedeliveryPolicyRef() |
String |
getRetryWhileRef() |
org.apache.camel.LoggingLevel |
getRollbackLoggingLevel() |
String |
getTransactionManagerRef() |
String |
getTransactionTemplateRef() |
ErrorHandlerType |
getType() |
Boolean |
getUseOriginalMessage() |
void |
setDeadLetterHandleNewException(String deadLetterHandleNewException)
Whether the dead letter channel should handle (and ignore) any new exception that may been thrown during sending the
message to the dead letter endpoint.
|
void |
setDeadLetterUri(String deadLetterUri)
The dead letter endpoint uri for the Dead Letter error handler.
|
void |
setExecutorServiceRef(String executorServiceRef)
Sets a reference to a thread pool to be used by the error handler
|
void |
setLevel(org.apache.camel.LoggingLevel level)
Logging level to use when using the logging error handler type.
|
void |
setLogName(String logName)
Name of the logger to use for the logging error handler
|
void |
setOnExceptionOccurredRef(String onExceptionOccurredRef)
Sets a reference to a processor that should be processed just after an exception occurred.
|
void |
setOnPrepareFailureRef(String onPrepareFailureRef)
Sets a reference to a processor to prepare the
Exchange before
handled by the failure processor / dead letter channel. |
void |
setOnRedeliveryRef(String onRedeliveryRef)
Sets a reference to a processor that should be processed before a redelivery attempt.
|
void |
setRedeliveryPolicy(CamelRedeliveryPolicyFactoryBean redeliveryPolicy)
Sets the redelivery settings
|
void |
setRedeliveryPolicyRef(String redeliveryPolicyRef)
Sets a reference to a
RedeliveryPolicy to be used for redelivery settings. |
void |
setRetryWhileRef(String retryWhileRef)
Sets a reference to an retry while expression.
|
void |
setRollbackLoggingLevel(org.apache.camel.LoggingLevel rollbackLoggingLevel)
Sets the logging level to use for logging transactional rollback.
|
void |
setTransactionManagerRef(String transactionManagerRef)
References to the
PlatformTransactionManager to use with the transaction error handler. |
void |
setTransactionTemplateRef(String transactionTemplateRef)
References to the
TransactionTemplate to use with the transaction error handler. |
void |
setType(ErrorHandlerType type)
The type of the error handler
|
void |
setUseOriginalMessage(Boolean useOriginalMessage)
Will use the original input message when an
Exchange is moved to the dead letter queue. |
public ErrorHandlerDefinition()
public ErrorHandlerType getType()
public void setType(ErrorHandlerType type)
public String getDeadLetterUri()
public void setDeadLetterUri(String deadLetterUri)
public String getDeadLetterHandleNewException()
public void setDeadLetterHandleNewException(String deadLetterHandleNewException)
Exchange
. This can be used in situations
where you use transactions, and want to use Camel's dead letter channel to deal with exceptions during routing,
but if the dead letter channel itself fails because of a new exception being thrown, then by setting this to false
the new exceptions is propagated back and set on the Exchange
, which allows the transaction
to detect the exception, and rollback.public org.apache.camel.LoggingLevel getLevel()
public void setLevel(org.apache.camel.LoggingLevel level)
public org.apache.camel.LoggingLevel getRollbackLoggingLevel()
public void setRollbackLoggingLevel(org.apache.camel.LoggingLevel rollbackLoggingLevel)
public String getLogName()
public void setLogName(String logName)
public Boolean getUseOriginalMessage()
public void setUseOriginalMessage(Boolean useOriginalMessage)
Exchange
is moved to the dead letter queue.
Notice: this only applies when all redeliveries attempt have failed and the Exchange
is doomed for failure.
Exchange
IN body we use the original IN body instead. This allows
you to store the original input in the dead letter queue instead of the inprogress snapshot of the IN body.
For instance if you route transform the IN body during routing and then failed. With the original exchange
store in the dead letter queue it might be easier to manually re submit the Exchange
again as the IN body
is the same as when Camel received it. So you should be able to send the Exchange
to the same input.
By default this feature is off.public String getTransactionTemplateRef()
public void setTransactionTemplateRef(String transactionTemplateRef)
TransactionTemplate
to use with the transaction error handler.public String getTransactionManagerRef()
public void setTransactionManagerRef(String transactionManagerRef)
PlatformTransactionManager
to use with the transaction error handler.public String getOnRedeliveryRef()
public void setOnRedeliveryRef(String onRedeliveryRef)
Exchange
before its being redelivered.public String getOnExceptionOccurredRef()
public void setOnExceptionOccurredRef(String onExceptionOccurredRef)
public String getOnPrepareFailureRef()
public void setOnPrepareFailureRef(String onPrepareFailureRef)
Exchange
before
handled by the failure processor / dead letter channel. This allows for example to enrich the message
before sending to a dead letter queue.public String getRetryWhileRef()
public void setRetryWhileRef(String retryWhileRef)
public String getRedeliveryPolicyRef()
public void setRedeliveryPolicyRef(String redeliveryPolicyRef)
RedeliveryPolicy
to be used for redelivery settings.public String getExecutorServiceRef()
public void setExecutorServiceRef(String executorServiceRef)
public CamelRedeliveryPolicyFactoryBean getRedeliveryPolicy()
public void setRedeliveryPolicy(CamelRedeliveryPolicyFactoryBean redeliveryPolicy)
Apache Camel