Search in sources :

Example 11 with RedeliveryErrorHandler

use of org.apache.camel.processor.RedeliveryErrorHandler in project camel by apache.

the class ManagedErrorHandler method setBackOffMultiplier.

public void setBackOffMultiplier(Double multiplier) {
    if (!isSupportRedelivery()) {
        throw new IllegalArgumentException("This error handler does not support redelivery");
    }
    RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
    redelivery.getRedeliveryPolicy().setBackOffMultiplier(multiplier);
}
Also used : RedeliveryErrorHandler(org.apache.camel.processor.RedeliveryErrorHandler)

Example 12 with RedeliveryErrorHandler

use of org.apache.camel.processor.RedeliveryErrorHandler in project camel by apache.

the class ManagedErrorHandler method setRetriesExhaustedLogLevel.

public void setRetriesExhaustedLogLevel(String level) {
    if (!isSupportRedelivery()) {
        throw new IllegalArgumentException("This error handler does not support redelivery");
    }
    RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
    redelivery.getRedeliveryPolicy().setRetriesExhaustedLogLevel(LoggingLevel.valueOf(level));
}
Also used : RedeliveryErrorHandler(org.apache.camel.processor.RedeliveryErrorHandler)

Example 13 with RedeliveryErrorHandler

use of org.apache.camel.processor.RedeliveryErrorHandler in project camel by apache.

the class ManagedErrorHandler method setCollisionAvoidancePercent.

public void setCollisionAvoidancePercent(Double percent) {
    if (!isSupportRedelivery()) {
        throw new IllegalArgumentException("This error handler does not support redelivery");
    }
    RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
    redelivery.getRedeliveryPolicy().setCollisionAvoidancePercent(percent);
}
Also used : RedeliveryErrorHandler(org.apache.camel.processor.RedeliveryErrorHandler)

Example 14 with RedeliveryErrorHandler

use of org.apache.camel.processor.RedeliveryErrorHandler in project camel by apache.

the class ManagedErrorHandler method setLogRetryStackTrace.

public void setLogRetryStackTrace(Boolean log) {
    if (!isSupportRedelivery()) {
        throw new IllegalArgumentException("This error handler does not support redelivery");
    }
    RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
    redelivery.getRedeliveryPolicy().setLogRetryStackTrace(log);
}
Also used : RedeliveryErrorHandler(org.apache.camel.processor.RedeliveryErrorHandler)

Example 15 with RedeliveryErrorHandler

use of org.apache.camel.processor.RedeliveryErrorHandler in project camel by apache.

the class ManagedErrorHandler method setUseCollisionAvoidance.

public void setUseCollisionAvoidance(Boolean avoidance) {
    if (!isSupportRedelivery()) {
        throw new IllegalArgumentException("This error handler does not support redelivery");
    }
    RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
    redelivery.getRedeliveryPolicy().setUseCollisionAvoidance(avoidance);
}
Also used : RedeliveryErrorHandler(org.apache.camel.processor.RedeliveryErrorHandler)

Aggregations

RedeliveryErrorHandler (org.apache.camel.processor.RedeliveryErrorHandler)21 OnExceptionDefinition (org.apache.camel.model.OnExceptionDefinition)1 ErrorHandlerSupport (org.apache.camel.processor.ErrorHandlerSupport)1